summaryrefslogtreecommitdiff
path: root/src/core/components/elements
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-08-31 11:44:49 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-08-31 11:44:49 +0700
commita76376b74c02ee6875b68b6cfb59090a159df40a (patch)
tree58b38643f835852ed7ca443fef42a8487f9d7ba2 /src/core/components/elements
parentae6033238a4e7765bce7cbe96a2662f3c00b67c1 (diff)
<iman> update new cart pop up
Diffstat (limited to 'src/core/components/elements')
-rw-r--r--src/core/components/elements/Navbar/NavbarDesktop.jsx5
1 files changed, 3 insertions, 2 deletions
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 = () => {