From 6d57dbfd4e27eacfd1604b8d8326ee75326c0dd5 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 17 May 2023 15:49:50 +0700
Subject: fix search product not found

---
 src/lib/checkout/components/Checkout.jsx | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 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 40f5d8e5..088b641b 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -340,7 +340,7 @@ const Checkout = () => {
           {/* <p className='text-caption-2 text-gray_r-10 mb-2'>*) Belum termasuk biaya pengiriman</p> */}
           <p className='text-caption-2 text-gray_r-10 leading-5'>
             Dengan melakukan pembelian melalui website Indoteknik, saya menyetujui{' '}
-            <Link href='/' className='inline font-normal'>
+            <Link href='/syarat-ketentuan' className='inline font-normal'>
               Syarat & Ketentuan
             </Link>{' '}
             yang berlaku
@@ -564,7 +564,7 @@ const Checkout = () => {
               </div>
               <p className='text-caption-2 text-gray_r-11 leading-5'>
                 Dengan melakukan pembelian melalui website Indoteknik, saya menyetujui{' '}
-                <Link href='/' className='inline font-normal'>
+                <Link href='/syarat-ketentuan' className='inline font-normal'>
                   Syarat & Ketentuan
                 </Link>{' '}
                 yang berlaku
@@ -755,9 +755,11 @@ function formatDate(date) {
 
 function calculateEstimatedArrival(duration) {
   if (duration) {
-    const estimationDate = duration.split('-')
-    const from = addDays(new Date(), parseInt(estimationDate[0]) + 3)
-    const to = addDays(new Date(), parseInt(estimationDate[1]) + 3)
+    let estimationDate = duration.split('-')
+    estimationDate[0] = parseInt(estimationDate[0])
+    estimationDate[1] = parseInt(estimationDate[1])
+    const from = addDays(new Date(), estimationDate[0] + 3)
+    const to = addDays(new Date(), estimationDate[1] + 3)
 
     let etdText = `*Estimasi tiba ${formatDate(from)}`
 
-- 
cgit v1.2.3

