From 4339c49be8f30dbb47b6882e61e909837dc91e81 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 31 Jul 2024 15:39:21 +0700
Subject: <iman> update auto reload add cart

---
 src-migrate/modules/product-detail/components/AddToCart.tsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src-migrate/modules/product-detail/components/AddToCart.tsx')

diff --git a/src-migrate/modules/product-detail/components/AddToCart.tsx b/src-migrate/modules/product-detail/components/AddToCart.tsx
index 097db98a..c4df555b 100644
--- a/src-migrate/modules/product-detail/components/AddToCart.tsx
+++ b/src-migrate/modules/product-detail/components/AddToCart.tsx
@@ -51,6 +51,9 @@ const AddToCart = ({
         error: { title: 'Menambahkan ke keranjang', description: 'Gagal menambahkan ke keranjang belanja' },
       }
     )
+    setTimeout(() => {
+      window.location.reload();
+    }, 1500);
 
     if (source === 'buy') {
       router.push('/shop/checkout?source=buy')
-- 
cgit v1.2.3

