diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-10-15 23:36:16 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-10-15 23:36:16 +0700 |
| commit | a5bfe3e6b43daaef2ed8f5bd39e7a8b78e2a2796 (patch) | |
| tree | ca518462c2e0b9a1108d3f91e3110870c884691d | |
| parent | 4a0f435693ded891842cd2a2209a51dc10803ea5 (diff) | |
<Miqdad> Image style desktop
| -rw-r--r-- | src/lib/product/components/ProductCard.jsx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 34fdf8dd..4c1e4a14 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -86,11 +86,26 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { aria-label='Produk' > <div className='relative'> - <Image + {/* New Image */} + <div + className='relative w-full overflow-hidden' + style={{ aspectRatio: '1 / 1' }} + > + <Image + src={image} + alt={product?.name} + fill + sizes='(max-width:640px) 100vw, 50vw' + className='object-contain object-center bg-white' + /> + </div> + {/* Old Image */} + + {/* <Image src={image} alt={product?.name} className='gambarA w-full object-contain object-center h-36 sm:h-48' - /> + /> */} <div className='absolute top-0 right-0 flex mt-3'> <div className='gambarB '> {product?.isSni && ( |
