diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-11 16:32:49 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-11 16:32:49 +0700 |
| commit | 2413603c4e17c5ab2f3d07ec26c40f1d2f61bc67 (patch) | |
| tree | 88f4f6d139523c07b1a447b1ed11fa6735eb19c5 /src/lib/variant/components/VariantCard.jsx | |
| parent | 39dbe8f266beb7092bd6269dd737959d5e7ff5d0 (diff) | |
validate if price 0
Diffstat (limited to 'src/lib/variant/components/VariantCard.jsx')
| -rw-r--r-- | src/lib/variant/components/VariantCard.jsx | 12 |
1 files changed, 10 insertions, 2 deletions
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> |
