MCPcopy Create free account
hub / github.com/WebDevSimplified/calendly-clone / NavLink

Function NavLink

src/components/NavLink.tsx:8–24  ·  view source on GitHub ↗
({ className, ...props }: ComponentProps<typeof Link>)

Source from the content-addressed store, hash-verified

6import { ComponentProps } from "react"
7
8export function NavLink({ className, ...props }: ComponentProps<typeof Link>) {
9 const path = usePathname()
10 const isActive = path === props.href
11
12 return (
13 <Link
14 {...props}
15 className={cn(
16 "transition-colors",
17 isActive
18 ? "text-foreground"
19 : "text-muted-foreground hover:text-foreground",
20 className
21 )}
22 />
23 )
24}

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected