<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>
