From 0e71e073fc06d9b4e210fcdf4d9ade4b9fd93236 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sat, 7 Oct 2023 17:29:01 +0800 Subject: [PATCH] fix: fix nav status check in second level page --- src/client/components/NavItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/components/NavItem.tsx b/src/client/components/NavItem.tsx index 470764b..90af531 100644 --- a/src/client/components/NavItem.tsx +++ b/src/client/components/NavItem.tsx @@ -8,7 +8,7 @@ export const NavItem: React.FC<{ }> = React.memo((props) => { const location = useLocation(); - const isCurrent = location.pathname === props.to; + const isCurrent = location.pathname.startsWith(props.to); return (