diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-08-02 06:32:26 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-08-02 06:32:26 +0000 |
| commit | 5918e5e992d1d6800ecc6641fc3bc18019772750 (patch) | |
| tree | abef14f79cf3f6b26b6d32c40f334b9e65f08c34 /src-migrate/pages | |
| parent | 612a3e28416cce42710cda163ddc321fec3977fc (diff) | |
| parent | 1f5adcf66c175dde3ce3694eedb1acddb05613e5 (diff) | |
Merged in Feature/iman-unchek-cart (pull request #204)
<iman> add refresh cart after delete chart
Diffstat (limited to 'src-migrate/pages')
| -rw-r--r-- | src-migrate/pages/shop/cart/index.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src-migrate/pages/shop/cart/index.tsx b/src-migrate/pages/shop/cart/index.tsx index 4586c65c..d28e8c4b 100644 --- a/src-migrate/pages/shop/cart/index.tsx +++ b/src-migrate/pages/shop/cart/index.tsx @@ -17,6 +17,7 @@ import Image from '~/components/ui/image'; import { CartItem } from '~/types/cart' import { deleteUserCart ,upsertUserCart } from '~/services/cart' import { Trash2Icon } from 'lucide-react'; +import { useProductCartContext } from '@/contexts/ProductCartContext' const CartPage = () => { const router = useRouter(); @@ -29,6 +30,7 @@ const CartPage = () => { const [isLoadDelete, setIsLoadDelete] = useState<boolean>(false) const { loadCart, cart, summary } = useCartStore(); const useDivvice = useDevice(); + const { setRefreshCart } = useProductCartContext() useEffect(() => { if (typeof auth === 'object' && !cart) { @@ -99,6 +101,7 @@ const CartPage = () => { } } setIsLoadDelete(false) + setRefreshCart(true) } return ( |
