From a76376b74c02ee6875b68b6cfb59090a159df40a Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Sat, 31 Aug 2024 11:44:49 +0700
Subject: <iman> update new cart pop up

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index ff08a4a1..454202df 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -32,6 +32,7 @@ import {
 } from '@chakra-ui/react';
 import style from "./style/NavbarDesktop.module.css";
 import useTransactions from '@/lib/transaction/hooks/useTransactions';
+import { useCartStore } from '~/modules/cart/stores/useCartStore';
 
 const Search = dynamic(() => import('./Search'), { ssr: false });
 const TopBanner = dynamic(() => import('./TopBanner'), { ssr: false });
@@ -46,7 +47,7 @@ const NavbarDesktop = () => {
   const [templateWA, setTemplateWA] = useState(null);
   const [payloadWA, setPayloadWa] = useState(null);
   const [urlPath, setUrlPath] = useState(null);
-
+  const { loadCart, cart, summary, updateCartItem } = useCartStore();
   const router = useRouter();
 
   const { product } = useProductContext();
@@ -136,7 +137,7 @@ const NavbarDesktop = () => {
     return () => {
       window.removeEventListener('localStorageChange', handleCartChange);
     };
-  }, [transactions.data]);
+  }, [transactions.data, cart]);
 
   useEffect(() => {
     const handleQuotationChange = () => {
-- 
cgit v1.2.3

