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