<template>
  <div id="productEditList">
    <div class="columns is-multiline is-variable is-7-desktop">
      <div
        class="column is-one-quarter"
        v-for="product in products"
        :key="product.id"
      >
        <ProductEditCard v-bind:old-product="product"></ProductEditCard>
      </div>
    </div>
  </div>
</template>

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

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