summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-18 19:16:23 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-09-18 19:16:23 +0200
commit9bdc1da1961c854c7344d6e953d698ff4510ada2 (patch)
tree13a411ca3ef790cc07393c0704f29b95da157b28 /pages
parent0cd059d6318276376236be13438133a285478f3c (diff)
Model box card component
Diffstat (limited to 'pages')
-rw-r--r--pages/index.vue11
1 files changed, 10 insertions, 1 deletions
diff --git a/pages/index.vue b/pages/index.vue
index 2c84032..cecc169 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -1,11 +1,18 @@
<template lang="pug">
.mx-auto.max-w-7xl.py-6(class="sm:px-6 lg:px-8")
model-loading(v-if="isLoading")
-
+ section(v-else)
+ .grid.grid-cols-4.gap-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";
@@ -17,10 +24,12 @@ export default {
},
components: {
"model-loading": ModelLoading,
+ "model-box-card": ModelBoxCard,
},
computed: {
...mapGetters(["isLoading"]),
...mapGetters("auth", ["isLogged"]),
+ ...mapGetters("models", ["models"]),
},
created() {
this.$store.dispatch("models/getModels");