diff options
Diffstat (limited to 'src')
| -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) => { |
