feat: use masto client
This commit is contained in:
parent
4adab40932
commit
90c45b435f
14 changed files with 96 additions and 205 deletions
|
@ -1,12 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
const client = useClient()
|
||||
const { data: posts } = await useAsyncData(() => client.getPublicTimeline())
|
||||
const masto = await useMasto()
|
||||
const { data: timelines } = await useAsyncData('public-timelines', () => masto.timelines.fetchPublic().then(r => r.value))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div w-150>
|
||||
<template v-for="post in posts" :key="post.id">
|
||||
<PostCard :post="post" border="t gray/10" pt-4 />
|
||||
<template v-for="status of timelines" :key="status.id">
|
||||
<StatusCard :status="status" border="t gray/10" pt-4 />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue