summaryrefslogtreecommitdiff
path: root/src/lib/checkout/components/Checkout.jsx
diff options
context:
space:
mode:
authortrisusilo <tri.susilo@altama.co.id>2023-07-26 06:38:58 +0000
committertrisusilo <tri.susilo@altama.co.id>2023-07-26 06:38:58 +0000
commit3f9acbd9ee447fb5cf45cbd07821ad60c9d2f331 (patch)
tree00b211a28214e21d4498e5002e3749003e7be0e5 /src/lib/checkout/components/Checkout.jsx
parent1cb955105874fb9aa49d5b8323762f6780ff2f38 (diff)
parentd7d049c0a699e27d5acea163b6df09f6f2b0b5e3 (diff)
Merged in Hotfix/bugs_voucher (pull request #27)
fixing voucher
Diffstat (limited to 'src/lib/checkout/components/Checkout.jsx')
-rw-r--r--src/lib/checkout/components/Checkout.jsx12
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) => {