diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-09-22 09:08:13 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-09-22 09:08:13 +0700 |
| commit | bda91439b6ef4605a579bde8bef603b551aab3dd (patch) | |
| tree | 6ce4958f4000e3db72ceddebe7ffb468eefe395b /src/lib/cart/components/Cart.jsx | |
| parent | 4f285349adec93a040e41d1d8c0c1c7b57749397 (diff) | |
cart call for price
Diffstat (limited to 'src/lib/cart/components/Cart.jsx')
| -rw-r--r-- | src/lib/cart/components/Cart.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index efbcf76b..b5976a1b 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -22,6 +22,7 @@ import LogoSpinner from '@/core/components/elements/Spinner/LogoSpinner' import { getPromotionProgram } from '@/lib/promotinProgram/api/homepageApi' import PromotionType from '@/lib/promotinProgram/components/PromotionType' import { gtagBeginCheckout } from '@/core/utils/googleTag' +import { useProductCartContext } from '@/contexts/ProductCartContext' const Cart = () => { const router = useRouter() @@ -31,6 +32,8 @@ const Cart = () => { const [cart, setCart] = useState(null) + const {setRefreshCart} = useProductCartContext() + useEffect(() => { if (!auth) return }, [auth]) @@ -196,6 +199,7 @@ const Cart = () => { deleteItemCart({ productId }) setDeleteConfirmation(null) setProducts([...productsToUpdate]) + setRefreshCart(true) toast.success('Berhasil menghapus barang dari keranjang') } |
