diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2023-07-26 06:38:58 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2023-07-26 06:38:58 +0000 |
| commit | 3f9acbd9ee447fb5cf45cbd07821ad60c9d2f331 (patch) | |
| tree | 00b211a28214e21d4498e5002e3749003e7be0e5 /src/lib | |
| parent | 1cb955105874fb9aa49d5b8323762f6780ff2f38 (diff) | |
| parent | d7d049c0a699e27d5acea163b6df09f6f2b0b5e3 (diff) | |
Merged in Hotfix/bugs_voucher (pull request #27)
fixing voucher
Diffstat (limited to 'src/lib')
| -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 17616938..53ac63e1 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -105,11 +105,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) => { |
