From cf3bcd1f3d1e0649204a786e9532a099772dad85 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Sat, 31 Aug 2024 09:42:34 +0700
Subject: <iman> update cart pop up

---
 src-migrate/pages/shop/cart/index.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src-migrate/pages/shop/cart/index.tsx')

diff --git a/src-migrate/pages/shop/cart/index.tsx b/src-migrate/pages/shop/cart/index.tsx
index f33dde09..a2e477da 100644
--- a/src-migrate/pages/shop/cart/index.tsx
+++ b/src-migrate/pages/shop/cart/index.tsx
@@ -1,6 +1,6 @@
 import style from './cart.module.css';
 
-import React, { useEffect, useMemo, useState } from 'react';
+import React, { useEffect, useMemo, useRef, useState } from 'react';
 import Link from 'next/link';
 import { Button, Checkbox, Spinner, Tooltip } from '@chakra-ui/react';
 import { toast } from 'react-hot-toast';
@@ -28,10 +28,12 @@ const CartPage = () => {
   const [buttonSelectNow, setButtonSelectNow] = useState(true);
   const [isLoad, setIsLoad] = useState<boolean>(false)
   const [isLoadDelete, setIsLoadDelete] = useState<boolean>(false)
-  const { loadCart, cart, summary } = useCartStore();
+  const { loadCart, cart, summary, } = useCartStore();
   const useDivvice = useDevice();
   const { setRefreshCart } = useProductCartContext()
   const [isTop, setIsTop] = useState(true);
+  const [hasChanged, setHasChanged] = useState(false);
+  const prevCartRef = useRef<CartItem[] | null>(null);
 
   useEffect(() => {
     const handleScroll = () => {
-- 
cgit v1.2.3

