diff --git a/src/components/BottomNavigationBar/AccountButton.tsx b/src/components/BottomNavigationBar/AccountButton.tsx index a18275af..9087862d 100644 --- a/src/components/BottomNavigationBar/AccountButton.tsx +++ b/src/components/BottomNavigationBar/AccountButton.tsx @@ -9,32 +9,31 @@ import { useMemo } from 'react' import BottomNavigationBarItem from './BottomNavigationBarItem' export default function AccountButton() { - const { navigate, current } = usePrimaryPage() + const { navigate, current, display } = usePrimaryPage() const { pubkey, profile } = useNostr() const defaultAvatar = useMemo( () => (profile?.pubkey ? generateImageByPubkey(profile.pubkey) : ''), [profile] ) + const active = useMemo(() => current === 'me' && display, [display, current]) return ( { navigate('me') }} - active={current === 'me'} + active={active} > {pubkey ? ( profile ? ( - + ) : ( - + ) ) : ( diff --git a/src/components/BottomNavigationBar/ExploreButton.tsx b/src/components/BottomNavigationBar/ExploreButton.tsx index a434da81..9f8cd6c5 100644 --- a/src/components/BottomNavigationBar/ExploreButton.tsx +++ b/src/components/BottomNavigationBar/ExploreButton.tsx @@ -3,10 +3,13 @@ import { Compass } from 'lucide-react' import BottomNavigationBarItem from './BottomNavigationBarItem' export default function ExploreButton() { - const { navigate, current } = usePrimaryPage() + const { navigate, current, display } = usePrimaryPage() return ( - navigate('explore')}> + navigate('explore')} + > ) diff --git a/src/components/BottomNavigationBar/HomeButton.tsx b/src/components/BottomNavigationBar/HomeButton.tsx index 9d1df403..1917eb70 100644 --- a/src/components/BottomNavigationBar/HomeButton.tsx +++ b/src/components/BottomNavigationBar/HomeButton.tsx @@ -3,10 +3,13 @@ import { Home } from 'lucide-react' import BottomNavigationBarItem from './BottomNavigationBarItem' export default function HomeButton() { - const { navigate, current } = usePrimaryPage() + const { navigate, current, display } = usePrimaryPage() return ( - navigate('home')}> + navigate('home')} + > ) diff --git a/src/components/BottomNavigationBar/NotificationsButton.tsx b/src/components/BottomNavigationBar/NotificationsButton.tsx index 724d6752..b6055303 100644 --- a/src/components/BottomNavigationBar/NotificationsButton.tsx +++ b/src/components/BottomNavigationBar/NotificationsButton.tsx @@ -6,12 +6,12 @@ import BottomNavigationBarItem from './BottomNavigationBarItem' export default function NotificationsButton() { const { checkLogin } = useNostr() - const { navigate, current } = usePrimaryPage() + const { navigate, current, display } = usePrimaryPage() const { hasNewNotification } = useNotification() return ( checkLogin(() => navigate('notifications'))} >