fix: remove history state fallback + asyncdata (#687)
This commit is contained in:
parent
451c4a0701
commit
72ce43dde9
4 changed files with 10 additions and 19 deletions
|
@ -7,16 +7,13 @@ const { t } = useI18n()
|
|||
const params = useRoute().params
|
||||
const handle = $(computedEager(() => params.account as string))
|
||||
|
||||
const { data: account } = await useAsyncData(`account:${handle}`, async () => (
|
||||
window.history.state?.account as Account | undefined)
|
||||
?? await fetchAccountByHandle(handle),
|
||||
)
|
||||
const account = await fetchAccountByHandle(handle)
|
||||
|
||||
const paginator = useMasto().accounts.iterateStatuses(account.value!.id, { excludeReplies: false })
|
||||
const paginator = useMasto().accounts.iterateStatuses(account.id, { excludeReplies: false })
|
||||
|
||||
if (account) {
|
||||
useHeadFixed({
|
||||
title: () => `${t('tab.posts_with_replies')} | ${getDisplayName(account.value!)} (@${account.value!.acct})`,
|
||||
title: () => `${t('tab.posts_with_replies')} | ${getDisplayName(account)} (@${account.acct})`,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue