blob: cb51ea22a37f56a9b3d020d8e169d97dd0161cd8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<template>
<Featured :data="data.featured" />
<section class="space-y-4">
<Cards title="Trending Now" description="Currently Trending Anime" :data="data.trending" />
<Cards title="All Time Popular" description="Most Popular Anime" :data="data.popular" />
<Cards title="Upcoming Next Season" description="Upcoming Anime" :data="data.upcoming" />
<Cards title="Top 10 Anime" description="Top High Rated Anime" :data="data.top" />
</section>
</template>
<script setup>
const { data } = await useAsyncData("data", async () => {
const [featured, trending, popular, upcoming, top] = await Promise.all([
$fetch("/api/featured"),
$fetch("/api/trending"),
$fetch("/api/popular"),
$fetch("/api/upcoming"),
$fetch("/api/top")
]);
return { featured, trending, popular, upcoming, top }
});
</script>
|