Skip to content

Commit a909caa

Browse files
committed
fix image width for fixed images
1 parent eb29761 commit a909caa

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/components/CardList.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Image, { type ImageProps } from "next/image"
12
import type { ReactNode } from "react"
23
import {
34
Box,
@@ -10,7 +11,6 @@ import {
1011
useColorModeValue,
1112
} from "@chakra-ui/react"
1213

13-
import { Image, type ImageProps } from "@/components/Image"
1414
import { BaseLink } from "@/components/Link"
1515

1616
import * as url from "@/lib/utils/url"
@@ -62,14 +62,7 @@ const Card = ({
6262

6363
return (
6464
<CardContainer {...props}>
65-
{image && (
66-
<Image
67-
src={image}
68-
alt={alt ?? ""}
69-
sizes="20px"
70-
style={{ width: "20px", height: "auto" }}
71-
/>
72-
)}
65+
{image && <Image src={image} alt={alt ?? ""} width={20} />}
7366
<Flex flex="1 1 75%" direction="column">
7467
{isLink ? (
7568
<LinkOverlay

0 commit comments

Comments
 (0)