elk/pages/@[account].vue

26 lines
569 B
Vue
Raw Normal View History

2022-11-24 06:18:05 +00:00
<script setup lang="ts">
const params = useRoute().params
const accountName = $computed(() => params.account as string)
2022-11-25 09:50:49 +00:00
const account = await fetchAccountByName(accountName).catch(() => null)
2022-11-25 11:48:48 +00:00
if (account) {
useHead({
title: `${account.displayName} (@${account.acct})`,
})
}
2022-11-24 06:18:05 +00:00
</script>
<template>
<MainContent>
<template v-if="account">
<AccountHeader :account="account" border="b base" />
<NuxtPage />
</template>
<CommonNotFound v-else>
2022-11-25 09:50:49 +00:00
Account @{{ accountName }} not found
2022-11-24 06:18:05 +00:00
</CommonNotFound>
</MainContent>
</template>