From c73d88b2d14f67d908b4b980642dad0cffb006f4 Mon Sep 17 00:00:00 2001 From: Zura Sekhniashvili Date: Sat, 30 Mar 2024 12:08:48 +0400 Subject: [PATCH] Move product variable declaration after props --- backend/src/views/Products/ProductModal.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/src/views/Products/ProductModal.vue b/backend/src/views/Products/ProductModal.vue index d13f17f..fa07934 100644 --- a/backend/src/views/Products/ProductModal.vue +++ b/backend/src/views/Products/ProductModal.vue @@ -77,14 +77,6 @@ import CustomInput from "../../components/core/CustomInput.vue"; import store from "../../store/index.js"; import Spinner from "../../components/core/Spinner.vue"; -const product = ref({ - id: props.product.id, - title: props.product.title, - image: props.product.image, - description: props.product.description, - price: props.product.price -}) - const loading = ref(false) const props = defineProps({ @@ -95,6 +87,14 @@ const props = defineProps({ } }) +const product = ref({ + id: props.product.id, + title: props.product.title, + image: props.product.image, + description: props.product.description, + price: props.product.price +}) + const emit = defineEmits(['update:modelValue', 'close']) const show = computed({