From 2413603c4e17c5ab2f3d07ec26c40f1d2f61bc67 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Tue, 11 Apr 2023 16:32:49 +0700
Subject: validate if price 0

---
 src/lib/variant/components/VariantCard.jsx | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

(limited to 'src/lib/variant/components/VariantCard.jsx')

diff --git a/src/lib/variant/components/VariantCard.jsx b/src/lib/variant/components/VariantCard.jsx
index 8161473d..8cd70bc0 100644
--- a/src/lib/variant/components/VariantCard.jsx
+++ b/src/lib/variant/components/VariantCard.jsx
@@ -49,10 +49,18 @@ const VariantCard = ({ product, openOnClick = true, buyMore = false }) => {
           )}
         </div>
         <p className='text-caption-2 text-gray_r-11 mt-1'>
-          {currencyFormat(product.price.priceDiscount)} × {product.quantity} Barang
+          {product.price.priceDiscount > 0
+            ? currencyFormat(product.price.priceDiscount) + ' × ' + product.quantity + ' Barang'
+            : ''}
         </p>
         <p className='text-caption-2 text-gray_r-12 font-bold mt-2'>
-          {currencyFormat(product.quantity * product.price.priceDiscount)}
+          {product.price.priceDiscount > 0 ? (
+            currencyFormat(product.quantity * product.price.priceDiscount)
+          ) : (
+            <a href='https://wa.me/628128080622' className='underline text-danger-500'>
+              Call For Price{' '}
+            </a>
+          )}
         </p>
       </div>
     </div>
-- 
cgit v1.2.3

