A quick vibe-coded site to test response times of PLC.directory mirrors (over 3 attempts)
at main 751 B view raw
1import { NavLink as RouterNavLink, NavLinkProps } from "react-router-dom"; 2import { forwardRef } from "react"; 3import { cn } from "@/lib/utils"; 4 5interface NavLinkCompatProps extends Omit<NavLinkProps, "className"> { 6 className?: string; 7 activeClassName?: string; 8 pendingClassName?: string; 9} 10 11const NavLink = forwardRef<HTMLAnchorElement, NavLinkCompatProps>( 12 ({ className, activeClassName, pendingClassName, to, ...props }, ref) => { 13 return ( 14 <RouterNavLink 15 ref={ref} 16 to={to} 17 className={({ isActive, isPending }) => 18 cn(className, isActive && activeClassName, isPending && pendingClassName) 19 } 20 {...props} 21 /> 22 ); 23 }, 24); 25 26NavLink.displayName = "NavLink"; 27 28export { NavLink };