diff options
Diffstat (limited to 'src/lib/product/components/ProductCard.jsx')
| -rw-r--r-- | src/lib/product/components/ProductCard.jsx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index abf462a1..10ffdaec 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -8,7 +8,7 @@ import { useRouter } from 'next/router' const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { const router = useRouter() - + const callForPriceWhatsapp = whatsappUrl('product', { name: product.name, url: createSlug('/shop/product/', product.name, product.id, true) @@ -29,7 +29,12 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { {router.pathname != '/' && product?.flashSale?.id > 0 && ( <div className='absolute bottom-0 w-full grid'> <div className='absolute bottom-0 w-full h-full'> - <ImageNext src='/images/GAMBAR-BG-FLASH-SALE.jpg' className='h-full' width={1000} height={100} /> + <ImageNext + src='/images/GAMBAR-BG-FLASH-SALE.jpg' + className='h-full' + width={1000} + height={100} + /> </div> <div className='relative'> <div className='flex gap-x-1 items-center p-2 justify-center'> @@ -45,7 +50,9 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { height={5} /> <span className='text-white text-[9px] md:text-[10px] font-semibold'> - {product?.flashSale?.tag != "false" || product?.flashSale?.tag != product?.flashSale?.tag ? product?.flashSale?.tag : 'FLASH SALE'} + {product?.flashSale?.tag != 'false' || product?.flashSale?.tag + ? product?.flashSale?.tag + : 'FLASH SALE'} </span> </div> </div> @@ -138,7 +145,12 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { width={15} height={10} /> - <span className='text-white text-xs font-semibold'>{product?.flashSale?.tag != "false" || product?.flashSale?.tag != product?.flashSale?.tag ? product?.flashSale?.tag : 'FLASH SALE'}</span> + <span className='text-white text-xs font-semibold'> + {' '} + {product?.flashSale?.tag != 'false' || product?.flashSale?.tag + ? product?.flashSale?.tag + : 'FLASH SALE'} + </span> </div> )} {product?.manufacture?.name ? ( |
