diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-07-26 10:33:21 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-07-26 10:33:21 +0700 |
| commit | d7d049c0a699e27d5acea163b6df09f6f2b0b5e3 (patch) | |
| tree | ce5ec7a0e3f58b65e358ded35e57d9319a407286 /src/lib/checkout/components | |
| parent | a72a7503dd5f04c9f3db5a3803dce0610fcff7ea (diff) | |
fixing voucher
Diffstat (limited to 'src/lib/checkout/components')
| -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) => { |
