diff --git a/src/components/BottomNavigationBar/DiscussionsButton.tsx b/src/components/BottomNavigationBar/DiscussionsButton.tsx new file mode 100644 index 0000000..de9d6b5 --- /dev/null +++ b/src/components/BottomNavigationBar/DiscussionsButton.tsx @@ -0,0 +1,16 @@ +import { MessageCircle } from 'lucide-react' +import BottomNavigationBarItem from './BottomNavigationBarItem' + +export default function DiscussionsButton() { + // TODO: Implement discussions navigation when the component is built + const handleClick = () => { + // Placeholder for future discussions functionality + console.log('Discussions button clicked - component to be implemented') + } + + return ( + + + + ) +} diff --git a/src/components/BottomNavigationBar/index.tsx b/src/components/BottomNavigationBar/index.tsx index 574721b..0086e16 100644 --- a/src/components/BottomNavigationBar/index.tsx +++ b/src/components/BottomNavigationBar/index.tsx @@ -1,8 +1,7 @@ import { cn } from '@/lib/utils' -import AccountButton from './AccountButton' -import ExploreButton from './ExploreButton' import HomeButton from './HomeButton' import NotificationsButton from './NotificationsButton' +import DiscussionsButton from './DiscussionsButton' export default function BottomNavigationBar() { return ( @@ -15,10 +14,9 @@ export default function BottomNavigationBar() { paddingBottom: 'env(safe-area-inset-bottom)' }} > - - - + + ) } diff --git a/src/components/Titlebar/AccountButton.tsx b/src/components/Titlebar/AccountButton.tsx new file mode 100644 index 0000000..d5b7d04 --- /dev/null +++ b/src/components/Titlebar/AccountButton.tsx @@ -0,0 +1,43 @@ +import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' +import { Button } from '@/components/ui/button' +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' + +export default function AccountButton() { + 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 ( + + ) +} diff --git a/src/components/Titlebar/ExploreButton.tsx b/src/components/Titlebar/ExploreButton.tsx new file mode 100644 index 0000000..24e700e --- /dev/null +++ b/src/components/Titlebar/ExploreButton.tsx @@ -0,0 +1,18 @@ +import { usePrimaryPage } from '@/PageManager' +import { Button } from '@/components/ui/button' +import { Compass } from 'lucide-react' + +export default function ExploreButton() { + const { navigate, current, display } = usePrimaryPage() + + return ( + + ) +} diff --git a/src/pages/primary/NoteListPage/index.tsx b/src/pages/primary/NoteListPage/index.tsx index 5af33a5..e85b220 100644 --- a/src/pages/primary/NoteListPage/index.tsx +++ b/src/pages/primary/NoteListPage/index.tsx @@ -22,6 +22,8 @@ import { } from 'react' import { useTranslation } from 'react-i18next' import FeedButton from './FeedButton' +import ExploreButton from '@/components/Titlebar/ExploreButton' +import AccountButton from '@/components/Titlebar/AccountButton' import FollowingFeed from './FollowingFeed' import RelaysFeed from './RelaysFeed' @@ -120,7 +122,10 @@ function NoteListPageTitlebar({ return (
- +
+ + +
{setShowRelayDetails && (
)