@@ -129,38 +129,6 @@ const Content = (props: ChildOnlyProp) => (
129
129
< div className = "w-full px-8 py-4" { ...props } />
130
130
)
131
131
132
- const OptionContainer = ( props : ChildOnlyProp ) => (
133
- < Flex
134
- className = "mb-8 w-full flex-col justify-center px-8 lg:w-auto lg:flex-row"
135
- { ...props }
136
- />
137
- )
138
-
139
- const Option = (
140
- props : Pick < ButtonProps , "children" | "onClick" > & { isActive : boolean }
141
- ) => {
142
- return (
143
- < Button
144
- variant = "outline"
145
- className = { cn (
146
- `my-2 flex w-full items-center justify-center rounded-4xl border px-6 py-4 transition-none lg:mx-2 lg:w-auto lg:justify-start ${
147
- props . isActive
148
- ? "border-primary text-primary shadow-table-box"
149
- : "border-body text-body"
150
- } hover:border-primary hover:text-primary active:bg-transparent`
151
- ) }
152
- { ...props }
153
- />
154
- )
155
- }
156
-
157
- const OptionText = ( props : ChildOnlyProp ) => (
158
- < span
159
- className = "text-center text-md font-semibold md:text-2xl md:font-normal"
160
- { ...props }
161
- />
162
- )
163
-
164
132
const ButtonPrimary = ( props : Pick < ButtonProps , "children" | "onClick" > ) => (
165
133
< Button { ...props } />
166
134
)
@@ -1339,14 +1307,21 @@ const DappsPage = () => {
1339
1307
< H2 id = "explore" > { t ( "page-dapps-explore-dapps-title" ) } </ H2 >
1340
1308
< CenterText > { t ( "page-dapps-explore-dapps-description" ) } </ CenterText >
1341
1309
< H3 > { t ( "page-dapps-choose-category" ) } </ H3 >
1342
- < OptionContainer >
1310
+ < div className = "mb-8 grid w-full grid-cols-1 justify-center gap-4 px-8 sm:grid-cols-2 lg:w-auto lg:grid-cols-3 2xl:grid-cols-6" >
1343
1311
{ categoryKeys . map ( ( key , idx ) => {
1344
1312
const categoryType = key as CategoryType
1345
1313
const category = categories [ categoryType ]
1346
1314
return (
1347
- < Option
1315
+ < Button
1348
1316
key = { idx }
1349
- isActive = { selectedCategory === categoryType }
1317
+ variant = "outline"
1318
+ className = { cn (
1319
+ "flex items-center justify-center rounded-4xl border px-6 py-4 transition-none lg:justify-start" ,
1320
+ selectedCategory === categoryType
1321
+ ? "border-primary text-primary shadow-table-box"
1322
+ : "border-body text-body" ,
1323
+ "hover:border-primary hover:text-primary active:bg-transparent"
1324
+ ) }
1350
1325
onClick = { ( ) => {
1351
1326
handleCategorySelect ( categoryType , false )
1352
1327
trackCustomEvent ( {
@@ -1356,12 +1331,17 @@ const DappsPage = () => {
1356
1331
} )
1357
1332
} }
1358
1333
>
1359
- < Emoji className = "me-4 text-2xl" text = { category . emoji } />
1360
- < OptionText > { category . title } </ OptionText >
1361
- </ Option >
1334
+ < Emoji
1335
+ className = "me-4 shrink-0 text-2xl"
1336
+ text = { category . emoji }
1337
+ />
1338
+ < span className = "text-center text-md font-semibold md:text-2xl md:font-normal" >
1339
+ { category . title }
1340
+ </ span >
1341
+ </ Button >
1362
1342
)
1363
1343
} ) }
1364
- </ OptionContainer >
1344
+ </ div >
1365
1345
{ /* Category-specific content */ }
1366
1346
{ selectedCategory === CategoryType . FINANCE && (
1367
1347
< Content >
0 commit comments