mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Updated Image Component implementation
This commit is contained in:
@@ -3,7 +3,6 @@ import cn from 'classnames'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import type { ProductNode } from '@lib/bigcommerce/api/operations/get-all-products'
|
||||
import getPathname from '@lib/get-pathname'
|
||||
import { Heart } from '@components/icon'
|
||||
import s from './ProductCard.module.css'
|
||||
|
||||
@@ -25,7 +24,7 @@ const ProductCard: FC<Props> = ({
|
||||
imgHeight,
|
||||
priority,
|
||||
}) => {
|
||||
const src = getPathname(p.images.edges?.[0]?.node.urlOriginal!)
|
||||
const src = p.images.edges?.[0]?.node.urlOriginal!
|
||||
|
||||
if (variant === 'slim') {
|
||||
return (
|
||||
@@ -40,6 +39,7 @@ const ProductCard: FC<Props> = ({
|
||||
width={imgWidth}
|
||||
height={imgHeight}
|
||||
priority={priority}
|
||||
quality="90"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
@@ -69,6 +69,7 @@ const ProductCard: FC<Props> = ({
|
||||
width={imgWidth}
|
||||
height={imgHeight}
|
||||
priority={priority}
|
||||
quality="90"
|
||||
/>
|
||||
</div>
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user