Remove genUserName, use Anonymous fallback directly

This commit is contained in:
Alex Gleason committed 2026-05-30 02:06:38 +02:00
1 parent 4878f9414c
commit 881629a746
3 files changed
+1 -64

No files matched your search

+1 -2
View File
@@ -9,7 +9,6 @@ import {
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar.tsx';
import { Skeleton } from '@/components/ui/skeleton.tsx';
import { useLoggedInAccounts, type Account } from '@/hooks/useLoggedInAccounts';
import { genUserName } from '@/lib/genUserName';
interface AccountSwitcherProps {
onAddAccountClick: () => void;
@@ -21,7 +20,7 @@ export function AccountSwitcher({ onAddAccountClick }: AccountSwitcherProps) {
if (!currentUser) return null;
const getDisplayName = (account: Account): string => {
return account.metadata.name ?? genUserName(account.pubkey);
return account.metadata.name ?? 'Anonymous';
}
// While the metadata query is in-flight and we don't yet have a name,