summaryrefslogtreecommitdiff
path: root/src-migrate/modules/cart/stores
diff options
context:
space:
mode:
Diffstat (limited to 'src-migrate/modules/cart/stores')
-rw-r--r--src-migrate/modules/cart/stores/useCartStore.ts12
1 files changed, 1 insertions, 11 deletions
diff --git a/src-migrate/modules/cart/stores/useCartStore.ts b/src-migrate/modules/cart/stores/useCartStore.ts
index 3b50ec32..3d9a0aed 100644
--- a/src-migrate/modules/cart/stores/useCartStore.ts
+++ b/src-migrate/modules/cart/stores/useCartStore.ts
@@ -1,5 +1,5 @@
import { create } from 'zustand';
-import { CartItem, CartProps } from '~/types/cart';
+import { CartProps } from '~/types/cart';
import { getUserCart } from '~/services/cart';
type State = {
@@ -16,7 +16,6 @@ type State = {
type Action = {
loadCart: (userId: number) => Promise<void>;
- updateCartItem: (updateCart: CartProps) => void;
};
export const useCartStore = create<State & Action>((set, get) => ({
@@ -40,15 +39,6 @@ export const useCartStore = create<State & Action>((set, get) => ({
const summary = computeSummary(cart);
set({ summary });
},
- updateCartItem: (updatedCart) => {
- const cart = get().cart;
- if (!cart) return;
-
- set({ cart: updatedCart });
- const summary = computeSummary(updatedCart);
- set({ summary });
- },
-
}));
const computeSummary = (cart: CartProps) => {