feat: use nested routes for profile

This commit is contained in:
Anthony Fu 2022-11-24 14:18:05 +08:00
parent e81273e944
commit 1ee945447d
12 changed files with 56 additions and 36 deletions

View file

@ -3,18 +3,11 @@ const params = useRoute().params
const accountName = $computed(() => params.account as string)
const account = await fetchAccountByName(accountName)
const paginator = account ? masto.accounts.getFollowingIterable(account!.id!, {}) : null
const paginator = account ? masto.accounts.getFollowingIterable(account.id, {}) : null
</script>
<template>
<template v-if="account">
<div>
<AccountHeader :account="account" />
</div>
<AccountPaginator :paginator="paginator" />
</template>
<CommonNotFound v-else>
Account @{{ params.user }} not found
</CommonNotFound>
</template>