import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' import { Skeleton } from '@/components/ui/skeleton' import { generateImageByPubkey } from '@/lib/pubkey' import { cn } from '@/lib/utils' import { usePrimaryPage } from '@/PageManager' import { useNostr } from '@/providers/NostrProvider' import { UserRound } from 'lucide-react' import { useMemo } from 'react' import BottomNavigationBarItem from './BottomNavigationBarItem' export default function AccountButton() { const { navigate, current } = usePrimaryPage() const { pubkey, profile } = useNostr() const defaultAvatar = useMemo( () => (profile?.pubkey ? generateImageByPubkey(profile.pubkey) : ''), [profile] ) return ( { navigate('me') }} active={current === 'me'} > {pubkey ? ( profile ? ( ) : ( ) ) : ( )} ) }