From 0c74635521471e3d67c434a7df9cd9c61bbcaa72 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Fri, 6 Oct 2023 14:09:55 +0700
Subject: fixing discount presentage

---
 src/lib/product/components/ProductCard.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 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 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>
-- 
cgit v1.2.3

