We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae80dc4 commit 72883dbCopy full SHA for 72883db
components/Layout.tsx
@@ -8,7 +8,6 @@ import useStore from '~/store';
8
import { SectionContext } from '~/context';
9
import { useTheme } from 'next-themes';
10
import DarkModeToggle from './DarkModeToggle';
11
-import extractPathWithoutFragment from '~/lib/extractPathWithoutFragment';
12
import ScrollButton from './ScrollButton';
13
import Image from 'next/image';
14
@@ -138,7 +137,7 @@ const MainNavLink = ({
138
137
className?: string;
139
}) => {
140
const router = useRouter();
141
- const isActiveNav = extractPathWithoutFragment(router.asPath) === uri;
+ const isActiveNav = router.asPath.startsWith(uri);
142
143
return (
144
<Link
0 commit comments