'use client'; import { useState, useEffect } from 'react'; import Link from 'next/link'; import Image from 'next/image'; import { usePathname } from 'next/navigation'; import { useAuth } from '@/lib/contexts/AuthContext'; import { HomeIcon, SearchIcon, BellIcon, UserIcon, ShieldIcon, SettingsIcon, BotIcon } from './Icons'; import { formatFullHandle } from '@/lib/utils/handle'; export function Sidebar() { const { user, isAdmin } = useAuth(); const pathname = usePathname(); const [customLogoUrl, setCustomLogoUrl] = useState(null); useEffect(() => { fetch('/api/node') .then(res => res.json()) .then(data => { if (data.logoUrl) { setCustomLogoUrl(data.logoUrl); } }) .catch(() => {}); }, []); // Home is exact match const isHome = pathname === '/'; return ( ); }