import { Link, useLocation } from "react-router-dom"; interface Props { username: string; onLogout: () => void; } export function Navbar({ username, onLogout }: Props) { const { pathname } = useLocation(); function navClass(path: string) { const base = "px-4 py-2 rounded-lg text-sm font-medium transition-colors"; return pathname === path ? `${base} bg-indigo-600 text-white` : `${base} text-slate-300 hover:text-white hover:bg-slate-700`; } return ( ); }