diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-11-17 10:13:21 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-11-17 10:13:21 +0700 |
| commit | 6ebe202147269100cd63ef125e877e8f693a27a1 (patch) | |
| tree | 29a0ee0c5f78c734d286d2fecfe8e6196a2adabc /src/lib/product/components/Product | |
| parent | 4ea9fbdcdf1c6625204bbaea9c4b117febf0a212 (diff) | |
hotfix/round down discount precentage
Diffstat (limited to 'src/lib/product/components/Product')
| -rw-r--r-- | src/lib/product/components/Product/ProductDesktop.jsx | 4 | ||||
| -rw-r--r-- | src/lib/product/components/Product/ProductMobile.jsx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index b3174483..5f034c09 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -445,7 +445,7 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { <> <div className='flex gap-x-1 items-center mt-2'> <div className='badge-solid-red text-caption-1'> - {lowestPrice?.price?.discountPercentage}% + {Math.floor(lowestPrice?.price?.discountPercentage)}% </div> <div className='text-gray_r-9 line-through text-caption-1'> {currencyFormat(lowestPrice?.price?.price)} @@ -584,7 +584,7 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { <> <div className='flex items-center gap-x-1 justify-center'> <div className='badge-solid-red text-caption-1'> - {variant?.price?.discountPercentage}% + {Math.floor(variant?.price?.discountPercentage)}% </div> <div className='line-through text-caption-1 text-gray_r-11'> {currencyFormat(variant?.price?.price)} diff --git a/src/lib/product/components/Product/ProductMobile.jsx b/src/lib/product/components/Product/ProductMobile.jsx index ef2c0002..e23e2fb9 100644 --- a/src/lib/product/components/Product/ProductMobile.jsx +++ b/src/lib/product/components/Product/ProductMobile.jsx @@ -260,7 +260,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { {activeVariant.isFlashsale && activeVariant?.price?.discountPercentage > 0 ? ( <> <div className='flex gap-x-1 items-center'> - <div className='badge-solid-red'>{activeVariant?.price?.discountPercentage}%</div> + <div className='badge-solid-red'>{Math.floor(activeVariant?.price?.discountPercentage)}%</div> <div className='text-gray_r-11 line-through text-caption-1'> {currencyFormat(activeVariant?.price?.price)} </div> |
