Skip to content

Commit aed300a

Browse files
authored
Merge pull request #13990 from saurabhburade/shadcn-migrate/BeaconChainActions
Shadcn Migration - BeaconChainActions
2 parents c814d92 + 86d0df1 commit aed300a

File tree

1 file changed

+17
-25
lines changed

1 file changed

+17
-25
lines changed

src/components/BeaconChainActions.tsx

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,38 @@
11
import { useTranslation } from "next-i18next"
2-
import { Box, Flex } from "@chakra-ui/react"
32

43
import { ChildOnlyProp } from "@/lib/types"
54

6-
import { ButtonLink } from "@/components/Buttons"
75
import Card from "@/components/Card"
86
import CardList, { type CardListItem } from "@/components/CardList"
9-
import OldHeading from "@/components/OldHeading"
107
import Translation from "@/components/Translation"
118

9+
import { ButtonLink } from "./ui/buttons/Button"
10+
import { Flex } from "./ui/flex"
11+
1212
import beaconchain from "@/public/images/upgrades/beaconchainemoji.png"
1313
import beaconscan from "@/public/images/upgrades/etherscan.png"
1414

1515
const H3 = ({ children }: ChildOnlyProp) => (
16-
<OldHeading
17-
as="h3"
18-
fontSize="2xl"
19-
fontWeight="bold"
20-
mb={8}
21-
sx={{ a: { display: "none" } }}
22-
>
23-
{children}
24-
</OldHeading>
16+
<h3 className="mb-8 mt-10 text-2xl font-bold [&_a]:hidden">{children}</h3>
2517
)
2618

2719
const BeaconChainActions = () => {
2820
const { t } = useTranslation(["page-upgrades-index", "page-upgrades"])
2921

3022
const datapoints: CardListItem[] = [
3123
{
32-
title: t("consensus-beaconscan-title"),
24+
title: t("page-upgrades:consensus-beaconscan-title"),
3325
image: beaconscan,
3426
alt: "",
3527
link: "https://beaconscan.com",
36-
description: t("consensus-beaconscan-desc"),
28+
description: t("page-upgrades:consensus-beaconscan-desc"),
3729
},
3830
{
39-
title: t("consensus-beaconscan-in-title"),
31+
title: t("page-upgrades:consensus-beaconscan-in-title"),
4032
image: beaconchain,
4133
alt: "",
4234
link: "https://beaconcha.in",
43-
description: t("consensus-beaconcha-in-desc"),
35+
description: t("page-upgrades:consensus-beaconcha-in-desc"),
4436
},
4537
]
4638

@@ -64,35 +56,35 @@ const BeaconChainActions = () => {
6456
]
6557

6658
return (
67-
<Box mb={16}>
68-
<Flex flexDir={{ base: "column", md: "row" }} pt={4}>
59+
<div className="mb-16">
60+
<Flex className="flex-col pt-4 md:flex-row">
6961
<Card
7062
w="full"
7163
ms={0}
7264
me={{ base: 0, md: 4 }}
7365
mb={{ base: 8, md: 0 }}
7466
emoji=":money_with_wings:"
75-
title={t("consensus-become-staker")}
76-
description={t("consensus-become-staker-desc")}
67+
title={t("page-upgrades:consensus-become-staker")}
68+
description={t("page-upgrades:consensus-become-staker-desc")}
7769
>
78-
<ButtonLink mb={3} href="https://launchpad.ethereum.org">
70+
<ButtonLink className="mb-3" href="https://launchpad.ethereum.org">
7971
<Translation id="get-started" />
8072
</ButtonLink>
8173
<ButtonLink variant="outline" href="/staking/">
82-
<Translation id="page-upgrades-index-staking-learn" />
74+
<Translation id="page-upgrades-index:page-upgrades-index-staking-learn" />
8375
</ButtonLink>
8476
</Card>
8577
</Flex>
8678
<H3>
87-
<Translation id="consensus-explore" />
79+
<Translation id="page-upgrades:consensus-explore" />
8880
</H3>
8981

9082
<CardList items={datapoints} />
9183
<H3>
92-
<Translation id="read-more" />
84+
<Translation id="page-upgrades:read-more" />
9385
</H3>
9486
<CardList items={reads} />
95-
</Box>
87+
</div>
9688
)
9789
}
9890

0 commit comments

Comments
 (0)