"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; const ICONS: Record = { video: ( ), image: ( ), folder: ( ), }; export default function NavLink({ href, icon, children }: { href: string; icon?: string; children: React.ReactNode; }) { const pathname = usePathname(); const active = href === "/" ? pathname === "/" || pathname.startsWith("/poster") || pathname.startsWith("/playreel") : pathname.startsWith(href); return ( {icon && ICONS[icon]} {children} ); }