Skip to content

Commit aeeb677

Browse files
committed
leverage css to control layout
1 parent b67a5da commit aeeb677

File tree

2 files changed

+192
-259
lines changed

2 files changed

+192
-259
lines changed

website/src/supportedNetworks/components/NetworkDetailsPage.tsx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Card, TimeIcon } from '@/components'
12
import { useI18n } from '@/i18n'
23

34
import { isEVMNetwork, type Network, type NetworkData, type ProcessedNetwork, supportsTokenAPI } from '../utils'
@@ -8,7 +9,6 @@ import {
89
evmWithTokenAPICards,
910
nonEvmNoTokenAPICards,
1011
nonEvmWithTokenAPICards,
11-
ResourceCardsLayout,
1212
} from './ResourceCards'
1313

1414
type NetworkDetailsPageProps = {
@@ -58,12 +58,24 @@ function NetworkDetailsPage({ network }: NetworkDetailsPageProps) {
5858
const { t } = useI18n()
5959
const isEVM = isEVMNetwork(network)
6060
const features = getNetworkFeatures(network)
61-
const resourceCards = getResourceCardsConfig(isEVM, features)
61+
const cards = getResourceCardsConfig(isEVM, features)
6262

6363
return (
6464
<>
65-
<h3 className="text-h18 mt-0">{t('index.supportedNetworks.guides')}</h3>
66-
<ResourceCardsLayout {...resourceCards} />
65+
<h3 className="text-h18">{t('index.supportedNetworks.guides')}</h3>
66+
<div className="grid grid-cols-6 gap-4">
67+
{cards.map((card) => (
68+
<Card
69+
key={t(card.titleKey as any)}
70+
href={card.href}
71+
title={t(card.titleKey as any)}
72+
description={t(card.descriptionKey as any)}
73+
slotAboveTitle={<TimeIcon variant="reading" minutes={card.minutes} />}
74+
className="col-span-full [&:nth-child(-n+3)]:lg:col-span-2 [&:nth-child(-n+3)]:lg:min-h-64 [&:nth-child(n+4)]:lg:col-span-3"
75+
icon={card.icon}
76+
/>
77+
))}
78+
</div>
6779
</>
6880
)
6981
}

0 commit comments

Comments
 (0)