summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-detail/components/Image.tsx
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2024-01-16 16:08:43 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2024-01-16 16:08:43 +0700
commita70fd5b6d9c7a769ac1aaa22a7d037ba3be27a05 (patch)
tree825d6b5de089bb22003bb2a517d371dc291f1962 /src-migrate/modules/product-detail/components/Image.tsx
parentd9dafa74857959974e9d379dc1a3abfbaf2af83d (diff)
Update improve product detail performance
Diffstat (limited to 'src-migrate/modules/product-detail/components/Image.tsx')
-rw-r--r--src-migrate/modules/product-detail/components/Image.tsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/src-migrate/modules/product-detail/components/Image.tsx b/src-migrate/modules/product-detail/components/Image.tsx
index 361580ea..2c5e989b 100644
--- a/src-migrate/modules/product-detail/components/Image.tsx
+++ b/src-migrate/modules/product-detail/components/Image.tsx
@@ -11,14 +11,16 @@ type Props = {
const Image = ({ product }: Props) => {
return (
- <div className='h-[340px] border border-gray-200 rounded-lg p-2 relative'>
+ <div className='h-[250px] md:h-[340px] flex items-center justify-center border border-gray-200 rounded-lg p-4 relative'>
<ImageUI
src={product.image || '/images/noimage.jpeg'}
alt={product.name}
- width={512}
- height={512}
- className='object-contain object-center h-full'
- classNames={{ wrapper: 'h-full' }}
+ width={256}
+ height={256}
+ className='object-contain object-center h-full w-full'
+ classNames={{ wrapper: 'h-full w-full' }}
+ loading='eager'
+ priority
/>
<div className='absolute hidden md:block top-4 right-4'>
<Tooltip