diff --git a/components/BottomBar.tsx b/components/BottomBar.tsx index 2576f6a..c3cd2fd 100644 --- a/components/BottomBar.tsx +++ b/components/BottomBar.tsx @@ -3,38 +3,42 @@ 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, 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"; +import { SearchIcon } from "lucide-react"; export default function BottomBar() { const router = useRouter(); const [pubkey, setPubkey] = useState(null); + const [mounted, setMounted] = useState(false); const pathname = usePathname(); useEffect(() => { - if (typeof window !== 'undefined') { - setPubkey(window.localStorage.getItem('pubkey') ?? null); - } + setMounted(true); + setPubkey(window.localStorage.getItem('pubkey')); }, []); - if (typeof window === 'undefined') return null; - const isActive = (path: string, currentPath: string) => currentPath === path ? 'text-purple-500' : ''; + // Render minimal navigation during SSR and hydration + if (!mounted) { + return ( + + ); + } + return ( ) } \ No newline at end of file