summaryrefslogtreecommitdiff
path: root/src/lib/checkout/components
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-08-09 10:47:44 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-08-09 10:47:44 +0700
commit407af81fb2d9ebdf3415fe7b34d08996ed7c80ec (patch)
tree675d0981a6259b814c3deb7bd053a85892fea53b /src/lib/checkout/components
parent9595223471946520f5c156e24eceb577fae4c901 (diff)
parent863047e92834479ce8edb576b57b129c611821a8 (diff)
Merge branch 'master' into CR/flash_sale
# Conflicts: # src/lib/product/components/ProductCard.jsx
Diffstat (limited to 'src/lib/checkout/components')
-rw-r--r--src/lib/checkout/components/Checkout.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 53ac63e1..c6ea73f2 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -107,7 +107,7 @@ const Checkout = () => {
const voucher = async () => {
if (!listVouchers) {
try {
- let dataVoucher = await getVoucher(auth?.id)
+ let dataVoucher = await getVoucher(auth?.id, query)
SetListVoucher(dataVoucher)
} finally {
setLoadingVoucher(false)
@@ -115,7 +115,7 @@ const Checkout = () => {
}
}
const VoucherCode = async (code) => {
- let dataVoucher = await findVoucher(code, auth.id)
+ let dataVoucher = await findVoucher(code, auth.id, query)
if (dataVoucher.length <= 0) {
SetFindVoucher(1)
return
@@ -427,7 +427,7 @@ const Checkout = () => {
<hr className='mt-10 my-4 border-gray_r-10' />
<div className=''>
- {!loadingVoucher && listVouchers.length === 0 ? (
+ {!loadingVoucher && listVouchers?.length === 0 ? (
<div className='flex items-center justify-center mt-4 mb-4'>
<div className='text-center'>
<h1 className='font-bold mb-4'>Tidak ada voucher tersedia</h1>