Skip to content

Commit 1002c4b

Browse files
committed
convert hero on find-wallets to shadcn/tailwind
1 parent 5403acd commit 1002c4b

File tree

1 file changed

+14
-26
lines changed

1 file changed

+14
-26
lines changed

src/pages/wallets/find-wallet.tsx

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@ import { GetStaticProps, InferGetStaticPropsType } from "next"
22
import { useRouter } from "next/router"
33
import { useTranslation } from "next-i18next"
44
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
5-
import { Box, Center, Text } from "@chakra-ui/react"
65

76
import type { BasePageProps, ChildOnlyProp, Lang, Wallet } from "@/lib/types"
87

98
import BannerNotification from "@/components/Banners/BannerNotification"
109
import Breadcrumbs from "@/components/Breadcrumbs"
1110
import FindWalletProductTable from "@/components/FindWalletProductTable"
12-
import { Image } from "@/components/Image"
11+
import { TwImage } from "@/components/Image"
1312
import InlineLink from "@/components/Link"
1413
import MainArticle from "@/components/MainArticle"
15-
import OldHeading from "@/components/OldHeading"
1614
import PageMetadata from "@/components/PageMetadata"
17-
import { Flex } from "@/components/ui/flex"
1815

1916
import { cn } from "@/lib/utils/cn"
2017
import { existsNamespace } from "@/lib/utils/existsNamespace"
@@ -30,15 +27,9 @@ import {
3027
import HeroImage from "@/public/images/wallets/wallet-hero.png"
3128

3229
const Subtitle = ({ children }: ChildOnlyProp) => (
33-
<Text
34-
fontSize="xl"
35-
lineHeight={1.4}
36-
color="body.medium"
37-
mb={6}
38-
_last={{ mb: 8 }}
39-
>
30+
<p className="mb-6 text-xl leading-[1.4] text-body-medium last:mb-8">
4031
{children}
41-
</Text>
32+
</p>
4233
)
4334

4435
type Props = BasePageProps & {
@@ -98,31 +89,27 @@ const FindWalletPage = ({
9889
{t("page-find-wallet-footnote-1")}
9990
</BannerNotification>
10091

101-
<Flex
92+
<div
10293
className={cn(
103-
"relative mb-[44px] w-full flex-col p-12 sm:flex-row",
94+
"relative mb-[44px] flex w-full flex-col p-12 md:flex-row",
10495
"bg-gradient-to-r from-accent-a/10 to-accent-c/10 dark:from-accent-a/20 dark:to-accent-c-hover/20"
10596
)}
10697
>
107-
<Box w={{ base: "full", sm: "50%" }} mt={{ base: 8, sm: 0 }}>
98+
<div className="mt-8 w-full sm:mt-0 md:w-1/2">
10899
<Breadcrumbs slug={pathname} />
109-
<OldHeading
110-
as="h1"
111-
fontSize={{ base: "2.5rem", md: "5xl" }}
112-
lineHeight={1.4}
113-
>
100+
<h1 className="mb-8 mt-8 text-[2.5rem] leading-[1.4] md:text-5xl">
114101
{t("page-find-wallet-title")}
115-
</OldHeading>
102+
</h1>
116103
<Subtitle>{t("page-find-wallet-description")}</Subtitle>
117104
<Subtitle>
118105
{t("page-find-wallet-desc-2")}{" "}
119106
<InlineLink href="/wallets">
120107
{t("page-find-wallet-desc-2-wallets-link")}
121108
</InlineLink>
122109
</Subtitle>
123-
</Box>
124-
<Center w={{ base: "full", sm: "50%" }}>
125-
<Image
110+
</div>
111+
<div className="flex w-full items-center justify-center md:w-1/2">
112+
<TwImage
126113
src={HeroImage}
127114
// TODO: adjust value when the old theme breakpoints are removed (src/theme.ts)
128115
sizes="(max-width: 480px) 100vw, 500px"
@@ -132,8 +119,9 @@ const FindWalletPage = ({
132119
objectFit: "contain",
133120
}}
134121
/>
135-
</Center>
136-
</Flex>
122+
</div>
123+
</div>
124+
137125
<FindWalletProductTable wallets={wallets} />
138126
</MainArticle>
139127
)

0 commit comments

Comments
 (0)