From b98b966213d36d0d8b3ad66a981e02a482f22e98 Mon Sep 17 00:00:00 2001 From: Bojan Mojsilovic Date: Tue, 9 Apr 2024 14:46:14 +0200 Subject: [PATCH] Prioritize display_name over name --- src/stores/profile.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stores/profile.ts b/src/stores/profile.ts index 907aeff..a215fa5 100644 --- a/src/stores/profile.ts +++ b/src/stores/profile.ts @@ -68,10 +68,10 @@ export const userName = (user: PrimalUser | undefined) => { if (!user) { return ''; } - const name = user.name || - user.display_name || + const name = user.display_name || user.displayName || - user.npub; + user.name || + truncateNpub(user.npub); return name ? name : @@ -85,7 +85,7 @@ export const authorName = (user: PrimalUser | undefined) => { const name = user.display_name || user.displayName || user.name || - user.npub; + truncateNpub(user.npub); return name ? name :