Merge branch 'main' of https://github.com/Byeto-Company/hossein_por_shop
This commit is contained in:
@@ -37,13 +37,10 @@ const addItemToCart = async () => {
|
||||
|
||||
// watch
|
||||
|
||||
watch(
|
||||
() => selectedVariantId.value,
|
||||
(newId) => {
|
||||
const newVariant = product.value!.variants.find((variant) => variant.id === newId)!;
|
||||
changeSelectedVariant(newVariant);
|
||||
}
|
||||
);
|
||||
watch([selectedVariantId, product], ([selectedVariantId, product]) => {
|
||||
const newVariant = product!.variants.find((variant) => variant.id === selectedVariantId)!;
|
||||
changeSelectedVariant(newVariant);
|
||||
});
|
||||
|
||||
watch(
|
||||
() => selectedColor.value,
|
||||
@@ -193,6 +190,7 @@ watch(
|
||||
|
||||
<div class="w-full flex flex-col gap-6 mt-10">
|
||||
<RemainQuantity
|
||||
:showSlider="selectedVariant!.cart_quantity === 0"
|
||||
:maxQuantity="selectedVariant!.in_stock"
|
||||
:quantity="selectedQuantity"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user