fix: handle undefined displayName (#21)

This commit is contained in:
patak 2022-11-21 16:07:55 +01:00 committed by GitHub
parent 2ef2e97a30
commit f7f3e9c7e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 9 deletions

View file

@ -25,7 +25,7 @@ const createdAt = $computed(() => {
</NuxtLink>
</div>
<NuxtLink flex flex-col :to="`/@${account.acct}`">
<CommonRichContent font-bold :content="account.displayName" />
<CommonRichContent font-bold :content="getDisplayName(account)" />
<p op50>
@{{ account.acct }}
</p>

View file

@ -15,7 +15,7 @@ const { link = true } = defineProps<{
</NuxtLink>
</div>
<NuxtLink flex flex-col :to="link ? `/@${account.acct}` : null">
<CommonRichContent font-bold :content="account.displayName" />
<CommonRichContent font-bold :content="getDisplayName(account)" />
<p op35 text-sm>
@{{ account.acct }}
</p>

View file

@ -9,6 +9,6 @@ defineProps<{
<template>
<NuxtLink :href="`/@${account.acct}`" flex gap-2 font-bold items-center>
<img :src="account.avatar" class="w-5 h-5 rounded">
<CommonRichContent :content="account.displayName" />
<CommonRichContent :content="getDisplayName(account)" />
</NuxtLink>
</template>