Skip to content

Commit ed64296

Browse files
committed
feat: use TwImage over NextImage
1 parent 1903544 commit ed64296

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/components/BentoBox/BentoCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { HTMLAttributes } from "react"
2-
import NextImage from "next/image"
32
import { type StaticImageData } from "next/image"
43
import { MdChevronRight } from "react-icons/md"
54

5+
import { TwImage } from "@/components/Image"
66
import { ButtonLink } from "@/components/ui/buttons/Button"
77

88
import { cn } from "@/lib/utils/cn"
@@ -33,7 +33,7 @@ const BentoCard = ({
3333
)}
3434
>
3535
<div className="mb-6 grid place-items-center">
36-
<NextImage src={imgSrc} alt="" width={imgWidth} height={imgHeight} />
36+
<TwImage src={imgSrc} alt="" width={imgWidth} height={imgHeight} />
3737
</div>
3838
<div>
3939
<h3 className="mb-2 text-3xl font-black">{title}</h3>

src/components/Hero/HomeHero/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
import NextImage from "next/image"
21
import { useTranslation } from "next-i18next"
32

43
import type { ClassNameProp, CommonHeroProps } from "@/lib/types"
54

5+
import { TwImage } from "@/components/Image"
66
import Morpher from "@/components/Morpher"
77

88
export type HomeHeroProps = Pick<CommonHeroProps, "heroImg"> & ClassNameProp
99

1010
const HomeHero = ({ heroImg, className }: HomeHeroProps) => {
1111
const { t } = useTranslation("page-index")
12+
1213
return (
1314
<div className={className}>
1415
<div className="h-[300px] sm:h-[350px] md:h-[380px] lg:h-[440px]">
15-
<NextImage
16+
<TwImage
1617
src={heroImg}
1718
alt={t("page-index:page-index-hero-image-alt")}
1819
// TODO: adjust value when the old theme breakpoints are removed (src/theme.ts)

src/pages/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Fragment, lazy, Suspense, useState } from "react"
22
import type { GetStaticProps, InferGetStaticPropsType } from "next"
3-
import NextImage from "next/image"
43
import { useRouter } from "next/router"
54
import { useTranslation } from "next-i18next"
65
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
@@ -386,7 +385,7 @@ const HomePage = ({
386385

387386
<Section>
388387
<SectionBanner>
389-
<NextImage src={ActivityImage} alt="" />
388+
<TwImage src={ActivityImage} alt="" />
390389
</SectionBanner>
391390

392391
<SectionContent>
@@ -405,7 +404,7 @@ const HomePage = ({
405404

406405
<Section className="md:flex-row-reverse">
407406
<SectionBanner>
408-
<NextImage src={LearnImage} alt="" />
407+
<TwImage src={LearnImage} alt="" />
409408
</SectionBanner>
410409

411410
<SectionContent>
@@ -450,7 +449,7 @@ const HomePage = ({
450449

451450
<Section>
452451
<SectionBanner>
453-
<NextImage src={BuildersImage} alt="" />
452+
<TwImage src={BuildersImage} alt="" />
454453
</SectionBanner>
455454

456455
<SectionContent>
@@ -518,7 +517,7 @@ const HomePage = ({
518517

519518
<Section className="md:flex-row-reverse">
520519
<SectionBanner>
521-
<NextImage src={CommunityImage} alt="" />
520+
<TwImage src={CommunityImage} alt="" />
522521
</SectionBanner>
523522

524523
<SectionContent>

0 commit comments

Comments
 (0)