This commit is contained in:
Avraham Sakal
2025-06-27 16:25:35 -04:00
parent 2a4ff2e509
commit 602ba72f75
18 changed files with 149 additions and 67 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import { NavLink } from "@mantine/core";
export function Link({ href, label }: { href: string; label: string }) {
const pageContext = usePageContext();
const { urlPathname } = pageContext;
const isActive = href === "/" ? urlPathname === href : urlPathname.startsWith(href);
const isActive =
href === "/" ? urlPathname === href : urlPathname.startsWith(href);
return <NavLink href={href} label={label} active={isActive} />;
}