Skip to content

Commit 7b066ed

Browse files
committed
Code cleanup
1 parent 5ac908b commit 7b066ed

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

nuxt3/components/Cart/CartAddToCartButton.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ defineProps({
4040
})
4141
4242
const addProductToCart = (product) => {
43-
isLoading.value = true
44-
addProductToWooCart(product)
45-
}
46-
47-
const addProductToWooCart = (product) => {
4843
const productId = product.databaseId ? product.databaseId : product
4944
const productQueryInput = {
5045
productId,
@@ -56,6 +51,8 @@ const addProductToWooCart = (product) => {
5651
variables,
5752
})
5853
54+
isLoading.value = true
55+
5956
mutate(variables)
6057
6158
onDone(() => {
@@ -66,7 +63,7 @@ const addProductToWooCart = (product) => {
6663
onError(() => {
6764
isLoading.value = false
6865
isError.value = true
69-
mutate(variables)
66+
//mutate(variables)
7067
})
7168
}
7269
</script>

0 commit comments

Comments
 (0)