Skip to content

Commit ca6d2ac

Browse files
authored
Merge pull request #18 from database-playground/tweak-styles
refactor: tweak design
2 parents 5f4ed87 + 8a749c9 commit ca6d2ac

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

app/(app)/challenges/[id]/_components/ide/description.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function QuestionDescription({ id }: { id: string }) {
1818
const { description } = data.question;
1919

2020
return (
21-
<div className="prose leading-4 tracking-wide text-foreground">
21+
<div className="prose leading-6 tracking-wide text-foreground">
2222
<Remark>{description}</Remark>
2323
</div>
2424
);

app/(app)/challenges/_components/questions-list.tsx

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export function ChallengeQuestionsList({
9999
});
100100

101101
return (
102-
<div>
102+
<div className="flex flex-col gap-4">
103103
{data?.questions.edges
104104
?.filter(
105105
(question) =>
@@ -115,27 +115,29 @@ export function ChallengeQuestionsList({
115115
})}
116116

117117
{data?.questions.pageInfo.hasNextPage && (
118-
<Button
119-
onClick={() =>
120-
fetchMore({
121-
variables: {
122-
after: data?.questions.pageInfo.endCursor,
123-
},
124-
updateQuery(previousQueryResult, options) {
125-
return {
126-
questions: {
127-
edges: [
128-
...(previousQueryResult.questions.edges || []),
129-
...(options.fetchMoreResult.questions.edges || []),
130-
],
131-
pageInfo: options.fetchMoreResult.questions.pageInfo,
132-
},
133-
};
134-
},
135-
})}
136-
>
137-
載入更多
138-
</Button>
118+
<div className="flex w-full justify-center">
119+
<Button
120+
onClick={() =>
121+
fetchMore({
122+
variables: {
123+
after: data?.questions.pageInfo.endCursor,
124+
},
125+
updateQuery(previousQueryResult, options) {
126+
return {
127+
questions: {
128+
edges: [
129+
...(previousQueryResult.questions.edges || []),
130+
...(options.fetchMoreResult.questions.edges || []),
131+
],
132+
pageInfo: options.fetchMoreResult.questions.pageInfo,
133+
},
134+
};
135+
},
136+
})}
137+
>
138+
載入更多
139+
</Button>
140+
</div>
139141
)}
140142
</div>
141143
);

0 commit comments

Comments
 (0)