From ebba81f144b860eaf3bd7a9ef2b1c63a2ff021e0 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Thu, 7 Nov 2024 12:59:56 +0700
Subject: get couries biteship

---
 src/lib/checkout/components/Checkout.jsx | 58 ++++----------------------------
 1 file changed, 6 insertions(+), 52 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 97254ec0..6da27745 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -269,58 +269,6 @@ const Checkout = () => {
     };
   }, []);
 
-  const hitungDiscountVoucher = (code, source) => {
-    let countDiscount = 0;
-    if (source === 'voucher') {
-      let dataVoucherIndex = listVouchers.findIndex(
-        (voucher) => voucher.code == code
-      );
-      let dataActiveVoucher = listVouchers[dataVoucherIndex];
-
-      countDiscount = dataActiveVoucher.discountVoucher;
-    } else {
-      let dataVoucherIndex = listVoucherShippings.findIndex(
-        (voucher) => voucher.code == code
-      );
-      let dataActiveVoucher = listVoucherShippings[dataVoucherIndex];
-
-      countDiscount = dataActiveVoucher.discountVoucher;
-    }
-
-    /*if (dataActiveVoucher.discountType === 'percentage') {
-      countDiscount = cartCheckout?.subtotal * (dataActiveVoucher.discountAmount / 100)
-      if (
-        dataActiveVoucher.maxDiscountAmount > 0 &&
-        countDiscount > dataActiveVoucher.maxDiscountAmount
-      ) {
-        countDiscount = dataActiveVoucher.maxDiscountAmount
-      }
-    } else {
-      countDiscount = dataActiveVoucher.discountAmount
-    }*/
-
-    return countDiscount;
-  };
-
-  // useEffect(() => {
-  //   if (!listVouchers) return;
-  //   if (!activeVoucher) return;
-
-  //   console.log('voucher')
-  //   const countDiscount = hitungDiscountVoucher(activeVoucher, 'voucher');
-
-  //   SetDiscountVoucher(countDiscount);
-  // }, [activeVoucher, listVouchers]);
-
-  // useEffect(() => {
-  //   if (!listVoucherShippings) return;
-  //   if (!activeVoucherShipping) return;
-
-  //   const countDiscount = hitungDiscountVoucher(activeVoucherShipping, 'voucher_shipping');
-
-  //   SetDiscountVoucherOngkir(countDiscount);
-  // }, [activeVoucherShipping, listVoucherShippings]);
-
   useEffect(() => {
     if (qVoucher === 'PASTIHEMAT' && listVouchers) {
       let code = qVoucher;
@@ -1698,6 +1646,12 @@ const SectionValidation = ({ address }) =>
     </BottomPopup>
   );
 
+const SectionExpedisiBiteship = ({ listExpedisi, setSelectedExpedisi }) => (
+  <>
+  </>
+);
+
+
 const SectionExpedisi = ({
   address,
   listExpedisi,
-- 
cgit v1.2.3

