develop #10
|
@ -1,5 +1,5 @@
|
|||
import { defineStore, storeToRefs } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { computed, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { apiBack } from "src/boot/axios";
|
||||
|
@ -194,9 +194,8 @@ export const useCartStore = defineStore("cart", () => {
|
|||
const params = transformOptionsToParams(
|
||||
availabilityForm.value || availability.value
|
||||
);
|
||||
const correctProduct = await apiBack.get(`products/${product.id}`, { params });
|
||||
console.log(hasCurrentProduct)
|
||||
await getProducts(params);
|
||||
const { correctProduct: { data }, } = await apiBack.get(`products/${product.id}`, { params });
|
||||
//await getProducts(params);
|
||||
|
||||
const hasCurrentProduct = computed(() => {
|
||||
return cart.value.find((p) => p.id === product.id);
|
||||
|
|
Loading…
Reference in New Issue