summaryrefslogtreecommitdiff
path: root/src-migrate/modules/cart/components/ItemAction.tsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-08-05 09:38:32 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-08-05 09:38:32 +0700
commit8aa9307006910e5b512fc6551f0046f0c5a6a2d5 (patch)
tree4380367b52d4881e37d26b4f5477b6eec462a91c /src-migrate/modules/cart/components/ItemAction.tsx
parent574754df6366cd693fbe2cd04a7a50fdf9597d1e (diff)
parent7eb2d613c6b16c89dd06491a54b229bcbcb8dc13 (diff)
Merge branch 'development' of https://bitbucket.org/altafixco/next-indoteknik into development
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Diffstat (limited to 'src-migrate/modules/cart/components/ItemAction.tsx')
-rw-r--r--src-migrate/modules/cart/components/ItemAction.tsx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src-migrate/modules/cart/components/ItemAction.tsx b/src-migrate/modules/cart/components/ItemAction.tsx
index e5e7f314..e73d507b 100644
--- a/src-migrate/modules/cart/components/ItemAction.tsx
+++ b/src-migrate/modules/cart/components/ItemAction.tsx
@@ -11,7 +11,6 @@ import { deleteUserCart, upsertUserCart } from '~/services/cart'
import { useDebounce } from 'usehooks-ts'
import { useCartStore } from '../stores/useCartStore'
-import { useProductCartContext } from '@/contexts/ProductCartContext'
type Props = {
@@ -20,7 +19,7 @@ type Props = {
const CartItemAction = ({ item }: Props) => {
const auth = getAuth()
- const { setRefreshCart } = useProductCartContext()
+
const [isLoadDelete, setIsLoadDelete] = useState<boolean>(false)
const [isLoadQuantity, setIsLoadQuantity] = useState<boolean>(false)
@@ -37,7 +36,6 @@ const CartItemAction = ({ item }: Props) => {
await deleteUserCart(auth.id, [item.cart_id])
await loadCart(auth.id)
setIsLoadDelete(false)
- setRefreshCart(true)
}
const decreaseQty = () => { setQuantity((quantity) => quantity -= 1) }