summaryrefslogtreecommitdiff
path: root/iridescence/src/components/ProductList.vue
blob: 537e8026ebfd6e99dfdb131314f4fae26f1efaf0 (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
33
34
35
36
<template>
  <div id="productsList">
    <div class="columns is-multiline is-variable is-7-desktop">
      <div
        class="column is-one-quarter"
        v-for="item in products"
        :key="item.id"
      >
        <ProductCard v-bind="item"></ProductCard>
      </div>
    </div>
  </div>
</template>

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

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