File tree Expand file tree Collapse file tree 2 files changed +25
-23
lines changed Expand file tree Collapse file tree 2 files changed +25
-23
lines changed Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments