From 25d0b04abb887a20f07ee4a84e504dfde18c2d42 Mon Sep 17 00:00:00 2001 From: w3bdesign <45217974+w3bdesign@users.noreply.github.com> Date: Sun, 29 Jun 2025 19:34:33 +0200 Subject: [PATCH 1/2] Show products --- components/Products/ProductGrid.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/Products/ProductGrid.vue b/components/Products/ProductGrid.vue index cbec9d8c..884c0bb2 100644 --- a/components/Products/ProductGrid.vue +++ b/components/Products/ProductGrid.vue @@ -26,7 +26,7 @@ import { useProductsStore } from "@/store/useProductsStore"; const store = useProductsStore(); -onMounted(() => { - store.fetchProducts(); -}); +if (store.products.length === 0) { + await store.fetchProducts(); +} From a8b53a180f7415cb7807ee77fa611300e5bae64b Mon Sep 17 00:00:00 2001 From: w3bdesign <45217974+w3bdesign@users.noreply.github.com> Date: Sun, 29 Jun 2025 19:39:32 +0200 Subject: [PATCH 2/2] Fix products --- components/Products/ProductGrid.vue | 26 +++++++++++--------------- pages/products.vue | 24 +++++++++++++++++++++++- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/components/Products/ProductGrid.vue b/components/Products/ProductGrid.vue index 884c0bb2..7dcf65ac 100644 --- a/components/Products/ProductGrid.vue +++ b/components/Products/ProductGrid.vue @@ -4,29 +4,25 @@
- - - diff --git a/pages/products.vue b/pages/products.vue index 05c6a3c3..6fd1cb88 100644 --- a/pages/products.vue +++ b/pages/products.vue @@ -2,12 +2,34 @@
- +
+ + + +