Skip to content

Commit 8e98151

Browse files
refactor(pages/what-is-ethereum): apply custom shadcn components
1 parent 828525f commit 8e98151

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

src/pages/what-is-ethereum.tsx

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { GetStaticProps, InferGetStaticPropsType } from "next"
2+
import type { ImageProps } from "next/image"
23
import { useRouter } from "next/router"
34
import { useTranslation } from "next-i18next"
45
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
@@ -20,13 +21,11 @@ import {
2021
BannerGridCell,
2122
BannerImage,
2223
} from "@/components/BannerGrid"
23-
import { Button, ButtonLink } from "@/components/Buttons"
2424
import Callout from "@/components/Callout"
2525
import Card from "@/components/Card"
2626
import EnergyConsumptionChart from "@/components/EnergyConsumptionChart"
2727
import FeedbackCard from "@/components/FeedbackCard"
28-
import { Image, type ImageProps } from "@/components/Image"
29-
import InlineLink from "@/components/Link"
28+
import { TwImage } from "@/components/Image"
3029
import MainArticle from "@/components/MainArticle"
3130
import PageMetadata from "@/components/PageMetadata"
3231
import { StandaloneQuizWidget } from "@/components/Quiz/QuizWidget"
@@ -35,7 +34,9 @@ import StatErrorMessage from "@/components/StatErrorMessage"
3534
import Tabs from "@/components/Tabs"
3635
import Tooltip from "@/components/Tooltip"
3736
import Translation from "@/components/Translation"
37+
import { Button, ButtonLink } from "@/components/ui/buttons/Button"
3838
import { Center, Flex, HStack, Stack, VStack } from "@/components/ui/flex"
39+
import InlineLink from "@/components/ui/Link"
3940

4041
import { cn } from "@/lib/utils/cn"
4142
import { existsNamespace } from "@/lib/utils/existsNamespace"
@@ -156,7 +157,7 @@ const NoWrapText = (props: ChildOnlyProp) => (
156157
)
157158

158159
const Image400 = ({ src }: Pick<ImageProps, "src">) => (
159-
<Image src={src} alt="" width={400} />
160+
<TwImage src={src} alt="" width={400} />
160161
)
161162

162163
const cachedFetchTxCount = runOnlyOnce(fetchTxCount)
@@ -318,7 +319,7 @@ const WhatIsEthereumPage = ({
318319
</header>
319320
</Stack>
320321
<Hero>
321-
<Image
322+
<TwImage
322323
src={hero}
323324
alt={t("page-what-is-ethereum-alt-img-bazaar")}
324325
// TODO: adjust value when the old theme breakpoints are removed (src/theme.ts)
@@ -652,7 +653,13 @@ const WhatIsEthereumPage = ({
652653
<ButtonLink href="/smart-contracts/">
653654
{t("page-what-is-ethereum-more-on-smart-contracts")}
654655
</ButtonLink>
655-
<ButtonLink href="/dapps/" variant="outline" isSecondary>
656+
<ButtonLink
657+
href="/dapps/"
658+
buttonProps={{
659+
variant: "outline",
660+
isSecondary: true,
661+
}}
662+
>
656663
{t("page-what-is-ethereum-explore-dapps")}
657664
</ButtonLink>
658665
</ButtonRow>
@@ -675,7 +682,13 @@ const WhatIsEthereumPage = ({
675682
<ButtonLink href="/eth/">
676683
{t("page-what-is-ethereum-what-is-ether")}
677684
</ButtonLink>
678-
<ButtonLink href="/get-eth/" variant="outline" isSecondary>
685+
<ButtonLink
686+
href="/get-eth/"
687+
buttonProps={{
688+
variant: "outline",
689+
isSecondary: true,
690+
}}
691+
>
679692
{t("page-what-is-ethereum-get-eth")}
680693
</ButtonLink>
681694
</ButtonRow>
@@ -704,8 +717,10 @@ const WhatIsEthereumPage = ({
704717
</ButtonLink>
705718
<ButtonLink
706719
href="/roadmap/merge/"
707-
variant="outline"
708-
isSecondary
720+
buttonProps={{
721+
variant: "outline",
722+
isSecondary: true,
723+
}}
709724
>
710725
{t("page-what-is-ethereum-the-merge-update")}
711726
</ButtonLink>

0 commit comments

Comments
 (0)