summaryrefslogtreecommitdiff
path: root/src/lib/checkout/components/Checkout.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/checkout/components/Checkout.jsx')
-rw-r--r--src/lib/checkout/components/Checkout.jsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index d5c370bf..fa8d8aea 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -71,7 +71,10 @@ const Checkout = () => {
source: query,
voucher: activeVoucher,
voucher_shipping: activeVoucherShipping,
- })
+ }),
+ {
+ keepPreviousData: true, // Menjaga data sebelumnya sampai data baru tersedia
+ }
);
const {
@@ -205,6 +208,7 @@ const Checkout = () => {
SetFindVoucher(1);
return;
}
+
dataVoucher.forEach((addNewLine) => {
if (addNewLine.applyType !== 'shipping') {
@@ -410,8 +414,6 @@ const Checkout = () => {
if (poNumber.current.value) data.po_number = poNumber.current.value;
if (typeof file !== 'undefined') data.po_file = await getFileBase64(file);
- console.log('ini data', data);
-
const isCheckouted = await checkoutApi({ data });
if (!isCheckouted?.id) {