|
1 | 1 | import { StaticImageData } from "next/image"
|
2 |
| -import Image from "next/image" |
3 |
| -import Link from "next/link" |
4 | 2 | import { useTranslation } from "next-i18next"
|
5 |
| -import { RiExternalLinkLine } from "react-icons/ri" |
6 | 3 |
|
7 | 4 | import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card"
|
8 | 5 |
|
9 |
| -import { Button } from "./ui/button" |
| 6 | +import { Button } from "./ui/buttons/Button" |
| 7 | +import InlineLink from "./ui/Link" |
| 8 | +import { TwImage } from "./Image" |
10 | 9 |
|
11 | 10 | export type Layer2ProductCardProps = {
|
12 | 11 | children?: React.ReactNode
|
@@ -38,12 +37,12 @@ const Layer2ProductCard = ({
|
38 | 37 | const { t } = useTranslation("page-layer-2")
|
39 | 38 |
|
40 | 39 | return (
|
41 |
| - <Card className="text-foreground 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 p-2 shadow-lg transition-transform duration-100 hover:scale-[1.02] dark:bg-background-medium"> |
42 | 41 | <div
|
43 | 42 | className="mb-4 flex min-h-[200px] items-center justify-center border-b"
|
44 | 43 | style={{ backgroundColor: background }}
|
45 | 44 | >
|
46 |
| - <Image |
| 45 | + <TwImage |
47 | 46 | src={image}
|
48 | 47 | alt={alt}
|
49 | 48 | width={100}
|
@@ -72,47 +71,46 @@ const Layer2ProductCard = ({
|
72 | 71 |
|
73 | 72 | <div className="space-y-1">
|
74 | 73 | {bridge && (
|
75 |
| - <Link |
| 74 | + <InlineLink |
76 | 75 | href={bridge}
|
77 | 76 | className="block text-primary underline hover:text-primary/80"
|
78 | 77 | >
|
79 | 78 | {name} {t("layer-2-bridge")}
|
80 |
| - </Link> |
| 79 | + </InlineLink> |
81 | 80 | )}
|
82 | 81 |
|
83 | 82 | {ecosystemPortal && (
|
84 |
| - <Link |
| 83 | + <InlineLink |
85 | 84 | href={ecosystemPortal}
|
86 | 85 | className="block text-primary underline hover:text-primary/80"
|
87 | 86 | >
|
88 | 87 | {name} {t("layer-2-ecosystem-portal")}
|
89 |
| - </Link> |
| 88 | + </InlineLink> |
90 | 89 | )}
|
91 | 90 |
|
92 | 91 | {tokenLists && (
|
93 |
| - <Link |
| 92 | + <InlineLink |
94 | 93 | href={tokenLists}
|
95 | 94 | className="block text-primary underline hover:text-primary/80"
|
96 | 95 | >
|
97 | 96 | {name} {t("layer-2-token-lists")}
|
98 |
| - </Link> |
| 97 | + </InlineLink> |
99 | 98 | )}
|
100 | 99 | </div>
|
101 | 100 | </CardContent>
|
102 | 101 |
|
103 | 102 | <CardFooter className="mt-2 p-2">
|
104 | 103 | {url && (
|
105 | 104 | <Button
|
106 |
| - variant={"default"} |
107 | 105 | asChild
|
108 | 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)]"
|
109 | 107 | >
|
110 |
| - <Link |
| 108 | + <InlineLink |
111 | 109 | href={url}
|
112 | 110 | className="flex items-center gap-0 text-lg text-white no-underline"
|
113 | 111 | >
|
114 |
| - {t("layer-2-explore")} {name} <RiExternalLinkLine /> |
115 |
| - </Link> |
| 112 | + {t("layer-2-explore")} {name} |
| 113 | + </InlineLink> |
116 | 114 | </Button>
|
117 | 115 | )}
|
118 | 116 | </CardFooter>
|
|
0 commit comments