feat: add not found for user pages
This commit is contained in:
parent
ae6552fee0
commit
a473cc2de5
5 changed files with 46 additions and 22 deletions
|
@ -2,13 +2,19 @@
|
|||
const params = useRoute().params
|
||||
const user = $computed(() => params.user as string)
|
||||
|
||||
const { data: account } = await useAsyncData(`${user}:info`, () => masto.accounts.lookup({ acct: user }))
|
||||
const paginator = masto.accounts.getFollowingIterable(account.value!.id!, {})
|
||||
const { data: account } = $(await useAsyncData(`${user}:info`, () => masto.accounts.lookup({ acct: user })))
|
||||
const paginator = account ? masto.accounts.getFollowingIterable(account!.id!, {}) : null
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<AccountHeader :account="account" />
|
||||
</div>
|
||||
<AccountPaginator :paginator="paginator" />
|
||||
<template v-if="account">
|
||||
<div>
|
||||
<AccountHeader :account="account" />
|
||||
</div>
|
||||
<AccountPaginator :paginator="paginator" />
|
||||
</template>
|
||||
|
||||
<CommonNotFound v-else>
|
||||
Account @{{ params.user }} not found
|
||||
</CommonNotFound>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue