Skip to content

Commit 9e9ed13

Browse files
committed
refactor use ButtonLink
1 parent 9d65ece commit 9e9ed13

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

src/components/Layer2ProductCard.tsx

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useTranslation } from "next-i18next"
33

44
import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card"
55

6-
import { Button } from "./ui/buttons/Button"
6+
import { ButtonLink } from "./ui/buttons/Button"
77
import InlineLink from "./ui/Link"
88
import { TwImage } from "./Image"
99

@@ -37,7 +37,7 @@ const Layer2ProductCard = ({
3737
const { t } = useTranslation("page-layer-2")
3838

3939
return (
40-
<Card className="flex flex-col justify-between rounded-md border-0 p-2 shadow-lg transition-transform duration-100 hover:scale-[1.02] dark:bg-background-medium">
40+
<Card className="flex flex-col justify-between rounded-md border-0 bg-background-highlight p-2 shadow-lg transition-transform duration-100 hover:scale-[1.02]">
4141
<div
4242
className="mb-4 flex min-h-[200px] items-center justify-center border-b"
4343
style={{ backgroundColor: background }}
@@ -46,8 +46,7 @@ const Layer2ProductCard = ({
4646
src={image}
4747
alt={alt}
4848
width={100}
49-
height={100}
50-
className="max-h-[257px] object-contain"
49+
className="max-h-[257px] object-cover"
5150
/>
5251
</div>
5352

@@ -101,17 +100,9 @@ const Layer2ProductCard = ({
101100

102101
<CardFooter className="mt-2 p-2">
103102
{url && (
104-
<Button
105-
asChild
106-
className="w-full rounded-sm hover:text-white hover:shadow-[4px_4px_4px_rgba(147,51,234,0.25)] dark:bg-primary-action dark:hover:bg-primary/90 dark:hover:shadow-[4px_4px_4px_rgba(0,0,0,0.9)]"
107-
>
108-
<InlineLink
109-
href={url}
110-
className="flex items-center gap-0 text-lg text-white no-underline"
111-
>
112-
{t("layer-2-explore")} {name}
113-
</InlineLink>
114-
</Button>
103+
<ButtonLink className="w-full" href={url}>
104+
{t("layer-2-explore")} {name}
105+
</ButtonLink>
115106
)}
116107
</CardFooter>
117108
</Card>

0 commit comments

Comments
 (0)