MCPcopy Create free account
hub / github.com/StaticMania/keep-react / IsActive

Function IsActive

app/components/Header.tsx:36–40  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

34 }, [pathname])
35
36 const IsActive = (str: string) => {
37 const lastPart = pathname.toLowerCase().split('/').pop()
38 const strPart = str.toLowerCase().split('/').pop()
39 return strPart === lastPart
40 }
41 return (
42 <header
43 className={`fixed top-0 z-50 w-full border-b bg-white dark:border-metal-800 ${pathname === '/' ? 'border-b-metal-100 dark:border-b-metal-900 dark:bg-[#0D1015]' : 'border-b-transparent dark:border-b-transparent dark:bg-metal-900'}`}>

Callers 1

HeaderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected