Skip to content

Commit b4e499d

Browse files
committed
Ammend styling issues with question page
1 parent a81e280 commit b4e499d

File tree

6 files changed

+40
-41
lines changed

6 files changed

+40
-41
lines changed

apps/frontend/src/app/question/[id]/page.tsx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -227,36 +227,36 @@ export default function QuestionPage() {
227227
visibleTestcases={visibleTestCases}
228228
/>
229229
</Col>
230-
<Col span={12} className="second-col" style={{ height: "100%" }}>
230+
<Col span={12} className="second-col">
231231
<Row className="history-row">
232232
<div className="history-container">
233233
<div className="history-top-container">
234234
<div className="history-title">
235235
<HistoryOutlined className="title-icons" />
236236
Submission History
237237
</div>
238-
</div>
239-
<div style={{ margin: "10px" }}>
240-
<Table
241-
rowKey="id"
242-
dataSource={userQuestionHistories}
243-
columns={columns}
244-
onRow={(record: any) => {
245-
return {
246-
onClick: () => handleRowClick(record),
247-
style: { cursor: "pointer" },
248-
};
249-
}}
250-
loading={isHistoryLoading}
251-
pagination={{
252-
size: "small",
253-
current: paginationParams.currentPage,
254-
total: paginationParams.totalCount,
255-
pageSize: paginationParams.limit,
256-
onChange: onPageJump,
257-
}}
258-
scroll={{ y: 200 }}
259-
/>
238+
<div style={{ margin: "10px" }}>
239+
<Table
240+
rowKey="id"
241+
dataSource={userQuestionHistories}
242+
columns={columns}
243+
onRow={(record: any) => {
244+
return {
245+
onClick: () => handleRowClick(record),
246+
style: { cursor: "pointer" },
247+
};
248+
}}
249+
loading={isHistoryLoading}
250+
pagination={{
251+
size: "small",
252+
current: paginationParams.currentPage,
253+
total: paginationParams.totalCount,
254+
pageSize: paginationParams.limit,
255+
onChange: onPageJump,
256+
}}
257+
scroll={{ y: 200 }}
258+
/>
259+
</div>
260260
</div>
261261
</div>
262262
</Row>

apps/frontend/src/app/question/[id]/styles.scss

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.question-content {
99
background: white;
1010
flex: 1;
11-
overflow-y: auto;
11+
// overflow-y: auto;
1212
}
1313

1414
.first-col,
@@ -21,21 +21,20 @@
2121
}
2222

2323
.history-row {
24-
padding: 1rem 0.25rem 0.25rem;
24+
padding: 0.5rem 0.25rem 0.25rem;
25+
height: 40%;
2526
}
2627

2728
.code-row {
2829
flex: 1;
29-
height: 100%;
30-
padding: 1rem 0.25rem 0.25rem;
30+
height: 60%;
31+
padding: 0.5rem 0.25rem 0.25rem;
3132
}
3233

33-
.test-top-container,
34-
.code-top-container,
35-
.history-top-container,
36-
.session-top-container {
34+
.test-top-container {
3735
display: flex;
3836
justify-content: space-between;
37+
height: 50%;
3938
}
4039

4140
.history-container,

apps/frontend/src/components/question/QuestionDetailFull/QuestionDetailFull.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ interface QuestionDetailFullProps {
2020
export const QuestionDetailFull = (props: QuestionDetailFullProps) => {
2121
return (
2222
<>
23-
<Row className="question-row">
23+
<Row className="question-box">
2424
<QuestionDetail
2525
questionTitle={props.questionTitle}
2626
complexity={props.complexity}
2727
categories={props.categories}
2828
description={props.description}
2929
/>
3030
</Row>
31-
<Row className="test-row">
31+
<Row className="test-box">
3232
<TestcaseDetail
3333
visibleTestcases={props.visibleTestcases}
3434
shouldShowSubmitButton={props.shouldShowSubmitButton}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.question-row {
1+
.question-box {
22
height: 50%;
3-
padding: 1rem 0.25rem 0.25rem;
3+
padding: 0.5rem 0.25rem 0.25rem;
44
}
55

6-
.test-row {
6+
.test-box {
77
height: 50%;
8-
padding: 1rem 0.25rem 0.25rem;
8+
padding: 0.5rem 0.25rem 0.25rem;
99
}

apps/frontend/src/components/question/TestcaseDetail/TestcaseDetail.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ export const TestcaseDetail = (props: TestcaseDetailProps) => {
8888
);
8989

9090
return (
91-
<div className="test-container">
92-
<div className="test-top-container">
91+
<div className="test-section">
92+
<div className="test-top-box">
9393
<div className="test-title">
9494
<FileDoneOutlined className="title-icons" />
9595
Test Cases

apps/frontend/src/components/question/TestcaseDetail/styles.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.test-container {
1+
.test-section {
22
border: 2px solid #463f3a;
33
border-radius: 10px;
44
width: 100%;
@@ -10,7 +10,7 @@
1010
font-weight: bold;
1111
}
1212

13-
.test-top-container {
13+
.test-top-box {
1414
display: flex;
1515
justify-content: space-between;
1616
}

0 commit comments

Comments
 (0)