elk/pages/@[user]/index.vue

19 lines
560 B
Vue
Raw Normal View History

2022-11-13 17:05:32 +01:00
<script setup lang="ts">
const props = defineProps<{
modelValue?: boolean
}>()
const params = useRoute().params
2022-11-15 13:08:49 +01:00
const user = $computed(() => params.user as string)
2022-11-15 04:26:52 +01:00
const masto = await useMasto()
2022-11-15 13:08:49 +01:00
const { data: account } = await useAsyncData(`${user}:info`, () => masto.accounts.lookup({ acct: user }))
const { data: status } = await useAsyncData(`${user}:status`, () => masto.accounts.fetchStatuses(account.value!.id!))
2022-11-13 17:05:32 +01:00
</script>
<template>
<div>
2022-11-15 04:26:52 +01:00
<AccountHeader :account="account" />
2022-11-13 17:05:32 +01:00
</div>
2022-11-15 13:08:49 +01:00
<TimelineList :timelines="status?.value" />
2022-11-13 17:05:32 +01:00
</template>