diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2023-10-09 03:48:41 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2023-10-09 03:48:41 +0000 |
| commit | 5ab25c12716065421e64fcd91403bce31708eea6 (patch) | |
| tree | b3979bcf815686565fc5d672873c01eb552cbe31 /src/lib/product/components/Product/ProductMobile.jsx | |
| parent | 397e589d7cbd927a3d3e62a1aade1deff1124af5 (diff) | |
| parent | 591dc095a0e5f655e419ec4d1ae11d8f54bed196 (diff) | |
Merged in CR/Pricelist (pull request #96)
CR/Pricelist
Diffstat (limited to 'src/lib/product/components/Product/ProductMobile.jsx')
| -rw-r--r-- | src/lib/product/components/Product/ProductMobile.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/product/components/Product/ProductMobile.jsx b/src/lib/product/components/Product/ProductMobile.jsx index 20a1d3f4..ffa75f72 100644 --- a/src/lib/product/components/Product/ProductMobile.jsx +++ b/src/lib/product/components/Product/ProductMobile.jsx @@ -161,7 +161,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { return ( <MobileView> <div className='relative'> - {product?.flashSale?.remainingTime > 0 && ( + {product?.flashSale?.remainingTime > 0 && activeVariant?.price.discountPercentage > 0 && ( <div className={`absolute bottom-0 w-full`}> <div className='absolute bottom-0 w-full'> <ImageNext @@ -174,7 +174,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { <div className='flex gap-x-2 items-center p-2'> <div className='bg-yellow-400 rounded-full p-1 h-9 w-20 flex items-center justify-center '> <span className='text-lg font-bold'> - {product.lowestPrice.discountPercentage}% + {Math.floor(product.lowestPrice.discountPercentage)}% </span> </div> <div @@ -232,7 +232,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { <div className='text-gray_r-12/80 text-caption-2 mt-2 mb-1'>Harga mulai dari: </div> )} - {activeVariant.isFlashsale ? ( + {activeVariant.isFlashsale && activeVariant?.price?.discountPercentage > 0 ? ( <> <div className='flex gap-x-1 items-center'> <div className='badge-solid-red'>{activeVariant?.price?.discountPercentage}%</div> |
