diff --git a/components/CartBar.vue b/components/CartBar.vue deleted file mode 100644 index 4f95b05..0000000 --- a/components/CartBar.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/components/CartPopup.vue b/components/CartPopup.vue deleted file mode 100644 index d320f58..0000000 --- a/components/CartPopup.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - - - diff --git a/stores/cart.js b/stores/cart.js index 03cd68e..9c069c8 100644 --- a/stores/cart.js +++ b/stores/cart.js @@ -5,7 +5,6 @@ export const useCartStore = defineStore('cart', () => { const items = ref([]) const totalCount = computed(() => items.value.reduce((s, i) => s + i.qty, 0)) - const totalAmount = computed(() => items.value.reduce((s, i) => s + i.product.price * i.qty, 0)) function addItem(product, qty = 1) { const exist = items.value.find(i => i.product.id === product.id) @@ -32,5 +31,5 @@ export const useCartStore = defineStore('cart', () => { items.value = [] } - return { items, totalCount, totalAmount, addItem, removeItem, updateQty, clearCart } + return { items, totalCount, addItem, removeItem, updateQty, clearCart } })