Create Grid component + Test. Index test adaptations

This commit is contained in:
2020-12-17 19:31:25 +01:00
parent baed9969b2
commit 10808b66b2
4 changed files with 53 additions and 5 deletions

View File

@@ -3,19 +3,25 @@
<h2 class="text-3xl font-normal mx-auto block text-center mb-4">
Ghibli films
</h2>
<div class="films">{{ films }}</div>
<Grid :dataSource="films" />
</section>
</template>
<script>
export default {
name: "Films",
components: { Grid: () => import("@/components/Grid") },
head: {
titleTemplate: "%s - Films"
},
async asyncData({ $axios }) {
const films = await $axios.$get("/api/films");
return { films };
},
data() {
return {
films: []
};
}
};
</script>