diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2023-07-26 06:19:20 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2023-07-26 06:19:20 +0000 |
| commit | 79d50d4e9aedcf61659576b305708c34670da3b1 (patch) | |
| tree | ce5ec7a0e3f58b65e358ded35e57d9319a407286 | |
| parent | 6f7df4cbdc809c452c7371ab2b1c700b8e02cfdc (diff) | |
| parent | d7d049c0a699e27d5acea163b6df09f6f2b0b5e3 (diff) | |
Merged in Hotfix/bugs_voucher (pull request #23)
fixing voucher
| -rw-r--r-- | src/lib/checkout/components/Checkout.jsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 11a14e31..92917d54 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -104,11 +104,13 @@ const Checkout = () => { const expedisiValidation = useRef(null) const voucher = async () => { - try { - let dataVoucher = await getVoucher(auth?.id) - SetListVoucher(dataVoucher) - } finally { - setLoadingVoucher(false) + if (!listVouchers) { + try { + let dataVoucher = await getVoucher(auth?.id) + SetListVoucher(dataVoucher) + } finally { + setLoadingVoucher(false) + } } } const VoucherCode = async (code) => { |
