Skip to content

Commit 3f8a166

Browse files
committed
fix: use next/image
1 parent a1ff872 commit 3f8a166

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

app/[locale]/10years/_components/TenYearHomeBanner.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { getTranslations } from "next-intl/server"
22

3+
import { Image } from "@/components/Image"
34
import ParallaxImage from "@/components/Image/ParallaxImage"
45
import { ButtonLink } from "@/components/ui/buttons/Button"
56

67
import Countdown from "./CountDown"
78
import { getTimeUnitTranslations } from "./utils"
89

10+
import TenYearBackgroundImage from "@/public/images/10-year-anniversary/10-year-background.png"
911
import TenYearGraphicImage from "@/public/images/10-year-anniversary/10-year-logo.png"
1012
import TenYearDesktopText from "@/public/images/10-year-anniversary/10yeartext.svg"
1113
import TenYearMobileText from "@/public/images/10-year-anniversary/10yeartext-mobile.svg"
@@ -19,8 +21,16 @@ const TenYearHomeBanner = async ({ locale }: { locale: string }) => {
1921
const timeLeftLabels = await getTimeUnitTranslations(locale)
2022

2123
return (
22-
<div className="relative rounded-2xl bg-[url('/images/10-year-anniversary/10-year-background.png')] bg-cover bg-center text-center">
23-
<div className="absolute h-full w-full rounded-2xl bg-ten-year-gradient opacity-80" />
24+
<div className="relative rounded-2xl bg-cover bg-center text-center">
25+
<div className="absolute inset-0 overflow-hidden rounded-2xl after:absolute after:inset-0 after:bg-ten-year-gradient after:opacity-80 after:content-['']">
26+
<Image
27+
src={TenYearBackgroundImage}
28+
alt=""
29+
sizes="(max-width: 1504px) 100vw, 1504px"
30+
quality={15}
31+
className="size-full"
32+
/>
33+
</div>
2434
<div className="relative rounded-2xl p-8">
2535
<ParallaxImage
2636
src={TenYearGraphicImage}

0 commit comments

Comments
 (0)