From ff972e0c46c81a38cddac2368000d3fc92756235 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Tue, 12 Sep 2023 10:44:19 +0700
Subject: bugs fix if flashsale tag false

---
 src/lib/product/components/ProductCard.jsx | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

(limited to 'src/lib/product/components/ProductCard.jsx')

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 ? (
-- 
cgit v1.2.3

