From f88f457fd1b91298ea8a7f9f396e49660a81e276 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Mon, 17 Mar 2025 09:06:47 +0700
Subject: handle bug service type kurir

---
 src/lib/checkout/components/Checkout.jsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'src/lib/checkout/components/Checkout.jsx')

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) {
-- 
cgit v1.2.3

