diff --git a/src/components/auth/AccountSwitcher.tsx b/src/components/auth/AccountSwitcher.tsx index 9b4783b..ff44767 100644 --- a/src/components/auth/AccountSwitcher.tsx +++ b/src/components/auth/AccountSwitcher.tsx @@ -14,6 +14,8 @@ import { RelaySelector } from '@/components/RelaySelector'; import { WalletModal } from '@/components/WalletModal'; import { useLoggedInAccounts, type Account } from '@/hooks/useLoggedInAccounts'; import { genUserName } from '@/lib/genUserName'; +import { useNavigate } from 'react-router-dom'; +import { nip19 } from 'nostr-tools'; interface AccountSwitcherProps { onAddAccountClick: () => void; @@ -21,6 +23,7 @@ interface AccountSwitcherProps { export function AccountSwitcher({ onAddAccountClick }: AccountSwitcherProps) { const { currentUser, otherUsers, setLogin, removeLogin } = useLoggedInAccounts(); + const navigate = useNavigate(); if (!currentUser) return null; @@ -43,6 +46,20 @@ export function AccountSwitcher({ onAddAccountClick }: AccountSwitcherProps) { + {/* Profile quick link */} + navigate(`/${nip19.npubEncode(currentUser.pubkey)}`)} + > + + + {getDisplayName(currentUser).charAt(0)} + +
+

{getDisplayName(currentUser)}

+
+
+
Switch Relay