Skip to content

Commit

Permalink
Fix about not appearing as active in header
Browse files Browse the repository at this point in the history
  • Loading branch information
oBusk committed Nov 7, 2022
1 parent b471253 commit 29c35fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Header/NavLink.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link, LinkProps } from "@chakra-ui/react";
import { useRouter } from "next/router";
import { usePathname } from "next/navigation";
import { FunctionComponent, useEffect, useState } from "react";
import { NextLink } from "^/components/theme";

Expand All @@ -12,7 +12,7 @@ const NavLink: FunctionComponent<LinkProps> = ({
children,
...props
}) => {
const { asPath } = useRouter() ?? {};
const asPath = usePathname();
const [isActive, setIsActive] = useState(false);

useEffect(() => {
Expand Down

0 comments on commit 29c35fd

Please sign in to comment.