"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; type NavItemProps = { item: { label: string; href: string; }; }; export const NavItem: React.FC = ({ item: { label, href } }) => { const pathname = usePathname(); const isActive = (path: string) => { if (path === "/") return pathname === "/"; return pathname.startsWith(path); }; const active = isActive(href); return (
  • {label}
  • ); };