File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { defineStore } from "pinia" ;
2
2
import { useQuery , useMutation } from "@vue/apollo-composable" ;
3
3
import { computed , ref , watch } from "vue" ;
4
+
4
5
import ADD_TO_CART_MUTATION from "@/apollo/mutations/ADD_TO_CART_MUTATION.gql" ;
5
6
import UPDATE_CART_MUTATION from "@/apollo/mutations/UPDATE_CART_MUTATION.gql" ;
6
7
import GET_CART_QUERY from "@/apollo/queries/GET_CART_QUERY.gql" ;
@@ -61,7 +62,6 @@ export const useCart = defineStore("cartState", () => {
61
62
} ) ;
62
63
await refetchCart ( ) ;
63
64
} catch ( err ) {
64
- console . error ( "Error adding to cart:" , err ) ;
65
65
} finally {
66
66
loading . value = false ;
67
67
}
@@ -79,7 +79,6 @@ export const useCart = defineStore("cartState", () => {
79
79
} ) ;
80
80
await refetchCart ( ) ;
81
81
} catch ( err ) {
82
- console . error ( "Error updating cart:" , err ) ;
83
82
await refetchCart ( ) ;
84
83
} finally {
85
84
loading . value = false ;
@@ -92,7 +91,6 @@ export const useCart = defineStore("cartState", () => {
92
91
try {
93
92
await updateCartItemQuantity ( key , 0 ) ;
94
93
} catch ( err ) {
95
- console . error ( "Error removing product from cart:" , err ) ;
96
94
} finally {
97
95
loading . value = false ;
98
96
await refetchCart ( ) ;
@@ -107,7 +105,6 @@ export const useCart = defineStore("cartState", () => {
107
105
await removeProductFromCart ( item . key ) ;
108
106
}
109
107
} catch ( err ) {
110
- console . error ( "Error clearing cart:" , err ) ;
111
108
} finally {
112
109
loading . value = false ;
113
110
await refetchCart ( ) ;
You can’t perform that action at this time.
0 commit comments