Files
t5de-site/components/nav-link.tsx
T
dhkatzandClaude Opus 5.5 8401f30f78
CI / test (push) Successful in 13s
CI / image (push) Successful in 12s
Release / release (push) Successful in 3s
feat: T5DE's website: landing page, download, changelog and FAQ
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 01:55:42 -08:00

22 lines
628 B
TypeScript

"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { cn } from "@/lib/utils";
/** A link in the navigation bar, marked when it's the current page. */
export function NavLink({ href, children }: { href: string; children: React.ReactNode }) {
const here = usePathname() === href;
return (
<Link
href={href}
aria-current={here ? "page" : undefined}
className={cn(
"rounded-md px-2.5 py-1.5 text-muted-foreground transition-colors hover:text-foreground",
here && "bg-muted text-foreground",
)}
>
{children}
</Link>
);
}