perf upgrade

This commit is contained in:
2026-07-12 21:26:16 -07:00
parent ec334bbed4
commit 778f0f7994
74 changed files with 1522 additions and 1014 deletions
@@ -19,14 +19,13 @@ export const NavLink = ({
include,
exclude,
}: NavLinkProps) => {
const router = useRouterState();
const pathname = useRouterState({ select: (s) => s.location.pathname });
const isActive = useMemo(
() =>
(!exclude?.some((e) => router.location.pathname.includes(e)) &&
(router.location.pathname === href ||
(router.location.pathname.includes(href) && href !== "/"))) ||
include?.includes(router.location.pathname),
[router.location.pathname, href]
(!exclude?.some((e) => pathname.includes(e)) &&
(pathname === href || (pathname.includes(href) && href !== "/"))) ||
include?.includes(pathname),
[pathname, href]
);
return (