From d1c0e083ac8f64dfaa8505fc11e30728dbd5a58d Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 19 Aug 2024 09:36:24 +0700
Subject: <iman> update voucher pasti hemat avoid failed

---
 src/lib/product/components/ProductCard.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(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 35e2a665..b5bb147c 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -16,7 +16,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
   const utmSource = useUtmSource();
   const [discount, setDiscount] = useState(0);
 
-  let voucherPastiHemat = 0;
+  let voucherPastiHemat = product?.voucherPastiHemat ? 0 : product.newVoucherPastiHemat;
   
   if (product?.voucherPastiHemat ? product?.voucherPastiHemat.length : voucherPastiHemat > 0) {
     const stringVoucher = product?.voucherPastiHemat[0];
-- 
cgit v1.2.3

