diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2023-04-11 09:33:59 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2023-04-11 09:33:59 +0000 |
| commit | 9f0a5b8260e3f1509de9596ee940b748c3b6600f (patch) | |
| tree | f11b16749cb2ccd9e19ca731ef1b689772834088 /src/lib/variant | |
| parent | 311bf133d0f8520566ab3e99f442c2ca6b710449 (diff) | |
| parent | 2413603c4e17c5ab2f3d07ec26c40f1d2f61bc67 (diff) | |
Merged in development_tri/feedback_UAT (pull request #4)
validate if price 0
Diffstat (limited to 'src/lib/variant')
| -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> |
