diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-10-06 14:09:55 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-10-06 14:09:55 +0700 |
| commit | 0c74635521471e3d67c434a7df9cd9c61bbcaa72 (patch) | |
| tree | 5cc134b3666006a70d181a296cfbac6358356da1 /src/lib/product/components | |
| parent | 5d4cf836d098e9c351bce4d25f0e88e341646ccc (diff) | |
fixing discount presentage
Diffstat (limited to 'src/lib/product/components')
| -rw-r--r-- | src/lib/product/components/Product/ProductDesktop.jsx | 2 | ||||
| -rw-r--r-- | src/lib/product/components/Product/ProductMobile.jsx | 2 | ||||
| -rw-r--r-- | src/lib/product/components/ProductCard.jsx | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index 4c8c3ae9..55878a93 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -216,7 +216,7 @@ const ProductDesktop = ({ products, 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 diff --git a/src/lib/product/components/Product/ProductMobile.jsx b/src/lib/product/components/Product/ProductMobile.jsx index 20a1d3f4..63b391d5 100644 --- a/src/lib/product/components/Product/ProductMobile.jsx +++ b/src/lib/product/components/Product/ProductMobile.jsx @@ -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 diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 6a5e29ab..5f213fe9 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -96,7 +96,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { <div className='text-gray_r-11 line-through text-[11px] sm:text-caption-2'> {currencyFormat(product.lowestPrice.price)} </div> - <div className='badge-solid-red'>{product?.lowestPrice.discountPercentage}%</div> + <div className='badge-solid-red'>{Math.floor( product?.lowestPrice.discountPercentage)}%</div> </div> )} @@ -196,7 +196,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { <> {product?.lowestPrice.discountPercentage > 0 && ( <div className='flex gap-x-1 mb-1 items-center'> - <div className='badge-solid-red'>{product?.lowestPrice?.discountPercentage}%</div> + <div className='badge-solid-red'>{Math.floor(product?.lowestPrice?.discountPercentage)}%</div> <div className='text-gray_r-11 line-through text-caption-2'> {currencyFormat(product?.lowestPrice?.price)} </div> |
