mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 16:33:36 +00:00
Remove genUserName, use Anonymous fallback directly
This commit is contained in:
3 files changed
+1
-64
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user