import { Link, useLocation } from 'react-router-dom'; import { useAuth } from '@/hooks/useAuth'; import UserAvatar from '@/components/UserAvatar'; import { Home, PlusSquare, Shield } from 'lucide-react'; export default function Navbar() { const { user } = useAuth(); const location = useLocation(); if (!user) return null; const isFeed = location.pathname === '/feed' || location.pathname === '/'; const isUpload = location.pathname === '/upload'; const isProfile = location.pathname.startsWith('/profile'); return ( {/* Логотип */} 🐾 Котограм {/* Навигация */} {/* Аватар */} {user.is_admin && ( )} ); } function NavIcon({ to, active, icon: Icon, label, }: { to: string; active: boolean; icon: React.ComponentType; label: string; }) { return ( {active && ( )} ); }