summaryrefslogtreecommitdiff
path: root/pages/index.vue
blob: 956e4f1ee8f30246fc1de1b09e4aa1f3fe8dab3a (plain)
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
37
38
<template lang="pug">
  .mx-auto.w-90p.py-6(class="sm:px-6 lg:px-8 md:max-w-7xl")
    model-loading(v-if="isLoading")
    section(v-else)
      .grid.grid-cols-1.gap-4(class="md:grid-cols-4")
        model-box-card(
          v-for="model in models"
          :key="model.id"
          :model="model"
        )
</template>

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

import { mapGetters } from "vuex";

export default {
  name: "IndexPage",
  layout: "default",
  head: {
    title: "Verden - Social for 3D artists",
  },
  components: {
    "model-loading": ModelLoading,
    "model-box-card": ModelBoxCard,
  },
  computed: {
    ...mapGetters(["isLoading"]),
    ...mapGetters("auth", ["isLogged"]),
    ...mapGetters("models", ["models"]),
  },
  created() {
    this.$store.dispatch("models/getModels");
  },
};
</script>