summaryrefslogtreecommitdiff
path: root/src/lib/product/components/ProductCard.jsx
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2023-09-15 01:41:26 +0000
committerIT Fixcomart <it@fixcomart.co.id>2023-09-15 01:41:26 +0000
commitedb2eda7b2cc4115e3d9f90a4ff9721454b1c8a9 (patch)
treec6c045bb69e7651e048542491aa57d8d6be5f2b5 /src/lib/product/components/ProductCard.jsx
parent4adc8375819bc84e71cd956f262160f4d0079431 (diff)
parentcf8daf7dd3a66084dfafdde1d9bf9d0d94fe42a7 (diff)
Merged in CR/migrasi_product_detail_to_solr (pull request #65)
CR/migrasi product detail to solr
Diffstat (limited to 'src/lib/product/components/ProductCard.jsx')
-rw-r--r--src/lib/product/components/ProductCard.jsx20
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 ? (