Skip to content

Commit a481beb

Browse files
fixed Navbar Active State Not Highlighting Docs and Specification on Related Pages
1 parent 72883db commit a481beb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/Layout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ const MainNavLink = ({
137137
className?: string;
138138
}) => {
139139
const router = useRouter();
140-
const isActiveNav = router.asPath.startsWith(uri);
140+
const isActiveNav =
141+
router.asPath.startsWith(uri) ||
142+
(uri === '/docs' && router.asPath.startsWith('/overview')) ||
143+
(uri === '/specification' && router.asPath.startsWith('/draft'));
141144

142145
return (
143146
<Link

0 commit comments

Comments
 (0)