2026-02-08 22:20:47 +01:00
|
|
|
'use client'
|
2026-02-08 19:40:39 +01:00
|
|
|
import Link from "next/link";
|
2026-02-08 22:20:47 +01:00
|
|
|
import { usePathname } from "next/navigation";
|
2026-02-08 19:40:39 +01:00
|
|
|
|
|
|
|
|
export default function NavItem({
|
|
|
|
|
children,
|
|
|
|
|
href
|
|
|
|
|
}: Readonly<{
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
href: string;
|
|
|
|
|
}>) {
|
2026-02-12 22:08:36 +01:00
|
|
|
const highlighted = usePathname() == href;
|
2026-02-10 10:58:33 +01:00
|
|
|
return <Link href={href} className={`text-lg mx-4 flex font-semibold ${highlighted ? 'underline underline-offset-8':""} hover:scale-110 active:rotate-4`}>
|
2026-02-08 19:40:39 +01:00
|
|
|
{children}
|
|
|
|
|
</Link>
|
|
|
|
|
}
|