Skip to content

Commit 0155ee6

Browse files
authored
Merge pull request #1500 from w3bdesign/develop
Refactor
2 parents 2970e0a + 7083753 commit 0155ee6

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

components/Products/ProductsSingleProduct.vue

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
<div
77
class="grid grid-cols-1 gap-4 mt-8 lg:grid-cols-2 xl:grid-cols-2 md:grid-cols-2 sm:grid-cols-2"
88
>
9-
<ProductImage
9+
<ProductsImage
1010
:alt="data.product.name"
1111
:src="data.product.image.sourceUrl"
1212
/>
1313
<div class="ml-8">
1414
<p class="text-3xl font-bold text-left">
1515
{{ data.product.name }}
1616
</p>
17-
<ProductPrice
17+
<ProductsPrice
1818
:product="data.product"
1919
:shouldCenterPrice="false"
2020
priceFontSize="big"
@@ -82,10 +82,6 @@ import { ref, watch, computed } from "vue";
8282
8383
import GET_SINGLE_PRODUCT_QUERY from "@/apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql";
8484
85-
import ProductImage from "@/components/Products/ProductImage.vue";
86-
import ProductPrice from "@/components/Products/ProductPrice.vue";
87-
import Toast from "@/components/common/Toast.vue";
88-
8985
import { stripHTML, filteredVariantName } from "@/utils/functions";
9086
9187
import { useCart } from "@/store/useCart";
@@ -113,7 +109,7 @@ watch(
113109
dataValue.product?.variations?.nodes[0].databaseId;
114110
}
115111
},
116-
{ immediate: true },
112+
{ immediate: true }
117113
);
118114
119115
/**
@@ -126,8 +122,6 @@ const addProductToCart = async (product) => {
126122
try {
127123
await cart.addToCart(product);
128124
toast.value.show();
129-
} catch (error) {
130-
131-
}
125+
} catch (error) {}
132126
};
133127
</script>
File renamed without changes.

0 commit comments

Comments
 (0)