summaryrefslogtreecommitdiff
path: root/iridescence/src/components/ProductList.vue
blob: bed37b342fba6724e355b81ba63776bc6de48e28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<template>
  <div id="productsList">
    <div class="columns is-multiline is-variable is-7-desktop">
      <div
        class="column is-one-quarter"
        v-for="product in products"
        :key="product.id"
      >
        <ProductCard v-bind="product"></ProductCard>
      </div>
    </div>
  </div>
</template>

<script>
import ProductCard from "@/components/ProductCard.vue";

export default {
  name: "ProductsList",
  components: {
    ProductCard
  },
  computed: {
    products() {
      return this.$store.getters.products;
    }
  },
  created() {
    this.$store.dispatch("refreshProducts");
  }
};
</script>