@@ -126,38 +126,6 @@ const Content = (props: ChildOnlyProp) => (
126
126
< div className = "w-full px-8 py-4" { ...props } />
127
127
)
128
128
129
- const OptionContainer = ( props : ChildOnlyProp ) => (
130
- < Flex
131
- className = "mb-8 w-full flex-col justify-center px-8 lg:w-auto lg:flex-row"
132
- { ...props }
133
- />
134
- )
135
-
136
- const Option = (
137
- props : Pick < ButtonProps , "children" | "onClick" > & { isActive : boolean }
138
- ) => {
139
- return (
140
- < Button
141
- variant = "outline"
142
- className = { cn (
143
- `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 ${
144
- props . isActive
145
- ? "border-primary text-primary shadow-table-box"
146
- : "border-body text-body"
147
- } hover:border-primary hover:text-primary active:bg-transparent`
148
- ) }
149
- { ...props }
150
- />
151
- )
152
- }
153
-
154
- const OptionText = ( props : ChildOnlyProp ) => (
155
- < span
156
- className = "text-center text-md font-semibold md:text-2xl md:font-normal"
157
- { ...props }
158
- />
159
- )
160
-
161
129
const ButtonPrimary = ( props : Pick < ButtonProps , "children" | "onClick" > ) => (
162
130
< Button { ...props } />
163
131
)
@@ -1324,14 +1292,21 @@ const DappsPage = () => {
1324
1292
< H2 id = "explore" > { t ( "page-dapps-explore-dapps-title" ) } </ H2 >
1325
1293
< CenterText > { t ( "page-dapps-explore-dapps-description" ) } </ CenterText >
1326
1294
< H3 > { t ( "page-dapps-choose-category" ) } </ H3 >
1327
- < OptionContainer >
1295
+ < 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" >
1328
1296
{ categoryKeys . map ( ( key , idx ) => {
1329
1297
const categoryType = key as CategoryType
1330
1298
const category = categories [ categoryType ]
1331
1299
return (
1332
- < Option
1300
+ < Button
1333
1301
key = { idx }
1334
- isActive = { selectedCategory === categoryType }
1302
+ variant = "outline"
1303
+ className = { cn (
1304
+ "flex items-center justify-center rounded-4xl border px-6 py-4 transition-none lg:justify-start" ,
1305
+ selectedCategory === categoryType
1306
+ ? "border-primary text-primary shadow-table-box"
1307
+ : "border-body text-body" ,
1308
+ "hover:border-primary hover:text-primary active:bg-transparent"
1309
+ ) }
1335
1310
onClick = { ( ) => {
1336
1311
handleCategorySelect ( categoryType , false )
1337
1312
trackCustomEvent ( {
@@ -1341,12 +1316,17 @@ const DappsPage = () => {
1341
1316
} )
1342
1317
} }
1343
1318
>
1344
- < Emoji className = "me-4 text-2xl" text = { category . emoji } />
1345
- < OptionText > { category . title } </ OptionText >
1346
- </ Option >
1319
+ < Emoji
1320
+ className = "me-4 shrink-0 text-2xl"
1321
+ text = { category . emoji }
1322
+ />
1323
+ < span className = "text-center text-md font-semibold md:text-2xl md:font-normal" >
1324
+ { category . title }
1325
+ </ span >
1326
+ </ Button >
1347
1327
)
1348
1328
} ) }
1349
- </ OptionContainer >
1329
+ </ div >
1350
1330
{ /* Category-specific content */ }
1351
1331
{ selectedCategory === CategoryType . FINANCE && (
1352
1332
< Content >
0 commit comments