lunasqu.ee-nuxt/pages/blog/archive/[year]/[month]/[day]/index.vue
2022-10-16 12:37:13 +03:00

15 lines
364 B
Vue

<template>
<NuxtLayout name="blog">
<template v-for="post of posts">
<BlogPost :post="post" :detail="false" />
</template>
</NuxtLayout>
</template>
<script setup lang="ts">
const route = useRoute();
const { data: posts } = await useFetch(
`/api/blog?year=${route.params.year}&month=${route.params.month}&day=${route.params.day}`
);
</script>