Skip to content

Commit 25d0b04

Browse files
committed
Show products
1 parent 3469eb9 commit 25d0b04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/Products/ProductGrid.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { useProductsStore } from "@/store/useProductsStore";
2626
2727
const store = useProductsStore();
2828
29-
onMounted(() => {
30-
store.fetchProducts();
31-
});
29+
if (store.products.length === 0) {
30+
await store.fetchProducts();
31+
}
3232
</script>

0 commit comments

Comments
 (0)