aboutsummaryrefslogtreecommitdiff
path: root/client/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/views')
-rw-r--r--client/src/views/Home.vue12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/src/views/Home.vue b/client/src/views/Home.vue
index 3e89885..a71d2cb 100644
--- a/client/src/views/Home.vue
+++ b/client/src/views/Home.vue
@@ -1,7 +1,7 @@
<template>
<div class="row mt-5">
- <div class="col-lg-3 col-md-4 col-sm-6">
- <ProductCard/>
+ <div v-for="product in products" :key="product._id" class="col-lg-3 col-md-4 col-sm-6">
+ <ProductCard :Id="product._id" :Name="product.name" :Price="product.price" :Img="product.imagePath"/>
</div>
</div>
</template>
@@ -13,6 +13,14 @@ export default {
name: 'Home',
components: {
ProductCard
+ },
+ mounted() {
+ this.$store.dispatch('pullProducts');
+ },
+ computed: {
+ products() {
+ return this.$store.getters.getProducts;
+ }
}
}
</script>