stuff done
This commit is contained in:
@@ -18,6 +18,7 @@ interface CartState {
|
||||
increaseQuantity: (productId: number) => void
|
||||
decreaseQuantity: (productId: number) => void
|
||||
removeItemFromCart: (productId: number) => void
|
||||
clearCart: () => void
|
||||
}
|
||||
|
||||
const useCartStore = create(
|
||||
@@ -88,6 +89,10 @@ const useCartStore = create(
|
||||
set({cartItems: updatedCartItems})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
clearCart: () => {
|
||||
set({cartItems: []})
|
||||
}
|
||||
}),
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user