diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-11-05 11:43:39 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-11-05 11:43:39 +0700 |
| commit | c51333688f9415f4d75f0123ba27a248ae1bc768 (patch) | |
| tree | 1bad8b0e5fa59bf6eac1144c1468ad3a98af24fe | |
| parent | 0024a3687e75f6b746aebcbfaf2d7953fce3b05b (diff) | |
<Miqdad> image mobile
| -rw-r--r-- | src-migrate/modules/product-detail/components/ProductDetail.tsx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src-migrate/modules/product-detail/components/ProductDetail.tsx b/src-migrate/modules/product-detail/components/ProductDetail.tsx index 17cd03ca..c9a05993 100644 --- a/src-migrate/modules/product-detail/components/ProductDetail.tsx +++ b/src-migrate/modules/product-detail/components/ProductDetail.tsx @@ -232,13 +232,12 @@ const ProductDetail = ({ product }: Props) => { allImages.map((img, i) => ( <div key={i} - className='w-full flex-shrink-0 snap-center flex justify-center items-center' + className='w-full flex-shrink-0 snap-center' > - {/* gambar diperkecil */} <img src={img} alt={`Gambar ${i + 1}`} - className='w-[85%] aspect-square object-contain' + className='w-full aspect-square object-contain block' onError={(e) => { (e.target as HTMLImageElement).src = '/images/noimage.jpeg'; @@ -247,11 +246,11 @@ const ProductDetail = ({ product }: Props) => { </div> )) ) : ( - <div className='w-full flex-shrink-0 snap-center flex justify-center items-center'> + <div className='w-full flex-shrink-0 snap-center'> <img src={mainImage || '/images/noimage.jpeg'} alt='Gambar produk' - className='w-[85%] aspect-square object-contain' + className='w-full aspect-square object-contain block' /> </div> )} |
