@@ -3,7 +3,6 @@ import { GetStaticProps, InferGetStaticPropsType, NextPage } from "next"
3
3
import { useTranslation } from "next-i18next"
4
4
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
5
5
import { FaGithub } from "react-icons/fa"
6
- import { Box , Flex , Icon , Stack , Text } from "@chakra-ui/react"
7
6
8
7
import { BasePageProps , Lang , QuizKey , QuizStatus } from "@/lib/types"
9
8
@@ -17,6 +16,7 @@ import QuizzesList from "@/components/Quiz/QuizzesList"
17
16
import QuizzesModal from "@/components/Quiz/QuizzesModal"
18
17
import QuizzesStats from "@/components/Quiz/QuizzesStats"
19
18
import { useLocalQuizData } from "@/components/Quiz/useLocalQuizData"
19
+ import { Flex , HStack , Stack } from "@/components/ui/flex"
20
20
21
21
import { existsNamespace } from "@/lib/utils/existsNamespace"
22
22
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
@@ -78,7 +78,7 @@ const QuizzesHubPage: NextPage<
78
78
)
79
79
80
80
return (
81
- < Box as = { MainArticle } >
81
+ < MainArticle >
82
82
< PageMetadata
83
83
title = { t ( "common:quizzes-title" ) }
84
84
description = { t ( "quizzes-subtitle" ) }
@@ -102,10 +102,10 @@ const QuizzesHubPage: NextPage<
102
102
updateUserStats = { updateUserStats }
103
103
/>
104
104
</ QuizzesModal >
105
- < Box px = { { base : 0 , lg : "8" } } py = { { base : 0 , lg : "4" } } mb = "12 ">
106
- < Flex direction = { { base : "column-reverse" , lg : "row" } } columnGap = "20 ">
107
- < Stack spacing = "10" flex = "1 ">
108
- < Box >
105
+ < div className = "mb-12 lg:px-8 lg:py-4 ">
106
+ < Flex className = "gap-x-20 max- lg:flex-col-reverse ">
107
+ < Stack className = " flex-1 gap-10 ">
108
+ < div >
109
109
< QuizzesList
110
110
content = { ethereumBasicsQuizzes }
111
111
headingId = { t ( "basics" ) }
@@ -118,51 +118,39 @@ const QuizzesHubPage: NextPage<
118
118
descriptionId = { t ( "using-ethereum-description" ) }
119
119
{ ...commonQuizListProps }
120
120
/>
121
- </ Box >
122
- < Flex
123
- direction = { { base : "column" , xl : "row" } }
124
- justify = "space-between"
125
- align = "center"
126
- bg = "background.highlight"
127
- borderRadius = { { lg : "lg" } }
128
- p = "8"
129
- gap = { { base : "4" , xl : 0 } }
130
- >
131
- < Box >
132
- < Text align = { { base : "center" , xl : "left" } } fontWeight = "bold" >
133
- { t ( "want-more-quizzes" ) }
134
- </ Text >
135
-
136
- < Text align = { { base : "center" , xl : "left" } } >
137
- { t ( "contribute" ) }
138
- </ Text >
139
- </ Box >
121
+ </ div >
122
+ < Flex className = "items-center justify-between bg-background-highlight p-8 max-xl:flex-col max-xl:gap-4 lg:rounded-lg" >
123
+ < div className = "max-xl:text-center" >
124
+ < p className = "font-bold" > { t ( "want-more-quizzes" ) } </ p >
125
+
126
+ < p > { t ( "contribute" ) } </ p >
127
+ </ div >
140
128
< ButtonLink
141
129
href = "/contributing/quizzes/"
142
130
variant = "outline"
143
131
hideArrow
144
132
onClick = { handleGHAdd }
145
133
>
146
- < Flex alignItems = "center ">
147
- < Icon as = { FaGithub } color = "text" boxSize = { 6 } me = { 2 } />
134
+ < HStack className = "gap-0 ">
135
+ < FaGithub className = "me-2 size-6 text-body" />
148
136
{ t ( "add-quiz" ) }
149
- </ Flex >
137
+ </ HStack >
150
138
</ ButtonLink >
151
139
</ Flex >
152
140
</ Stack >
153
- < Box flex = " 1">
141
+ < div className = "flex- 1">
154
142
< QuizzesStats
155
143
averageScoresArray = { userStats . average }
156
144
completedQuizzes = { userStats . completed }
157
145
totalCorrectAnswers = { userStats . score }
158
146
/>
159
- </ Box >
147
+ </ div >
160
148
</ Flex >
161
- </ Box >
162
- < Box w = " full" py = "4" px = "8 ">
149
+ </ div >
150
+ < div className = "w- full px-8 py-4 ">
163
151
< FeedbackCard />
164
- </ Box >
165
- </ Box >
152
+ </ div >
153
+ </ MainArticle >
166
154
)
167
155
}
168
156
0 commit comments