1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-05 00:19:59 +00:00
elk/pages/index.vue
2022-11-15 19:54:07 +08:00

15 lines
395 B
Vue

<script setup lang="ts">
const token = useCookie('nuxtodon-token')
const router = useRouter()
// TODO: move to middleware
if (!token.value)
router.replace('/public')
const masto = await useMasto()
const { data: timelines } = await useAsyncData('timelines-home', () => masto.timelines.fetchHome().then(r => r.value))
</script>
<template>
<TimelineList :timelines="timelines" />
</template>