diff --git a/components/BottomBar.tsx b/components/BottomBar.tsx index c3cd2fd..2576f6a 100644 --- a/components/BottomBar.tsx +++ b/components/BottomBar.tsx @@ -3,41 +3,37 @@ import { BellIcon, GlobeIcon, HomeIcon, RowsIcon, UploadIcon } from "@radix-ui/react-icons" import Link from "next/link" import { FormEvent, JSX, SVGProps, useEffect, useState } from "react" +import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar" import { useRouter, usePathname } from 'next/navigation' -import { SearchIcon } from "lucide-react"; +import { SearchIcon, Upload } from "lucide-react"; +import { + Drawer, + DrawerClose, + DrawerContent, + DrawerDescription, + DrawerFooter, + DrawerHeader, + DrawerTitle, + DrawerTrigger, +} from "@/components/ui/drawer" +import { Button } from "./ui/button"; +import { Textarea } from "./ui/textarea"; +import { useNostr } from "nostr-react"; export default function BottomBar() { const router = useRouter(); const [pubkey, setPubkey] = useState(null); - const [mounted, setMounted] = useState(false); const pathname = usePathname(); useEffect(() => { - setMounted(true); - setPubkey(window.localStorage.getItem('pubkey')); + if (typeof window !== 'undefined') { + setPubkey(window.localStorage.getItem('pubkey') ?? null); + } }, []); - const isActive = (path: string, currentPath: string) => currentPath === path ? 'text-purple-500' : ''; + if (typeof window === 'undefined') return null; - // Render minimal navigation during SSR and hydration - if (!mounted) { - return ( - - ); - } + const isActive = (path: string, currentPath: string) => currentPath === path ? 'text-purple-500' : ''; return (