Create Grid component + Test. Index test adaptations
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user