1
0
Fork 0
mirror of https://github.com/elk-zone/elk.git synced 2025-03-25 19:12:09 +03:00
elk/pages/@[account].vue

26 lines
584 B
Vue
Raw Normal View History

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