"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { cn } from "@/lib/utils";
interface NavLinkProps {
href: string;
children: React.ReactNode;
badge?: string;
}
export function NavLink({ href, children, badge }: NavLinkProps) {
const pathname = usePathname();
const isActive = pathname === href || pathname?.startsWith(`${href}/`);
return (
{children}
{badge && (
{badge}
)}
);
}