diff --git a/client/components/Link.tsx b/client/components/Link.tsx index 965a0652..5478a809 100644 --- a/client/components/Link.tsx +++ b/client/components/Link.tsx @@ -28,7 +28,10 @@ const Link: FunctionComponent = ({ const { asPath } = router; const pathTrimmed = asPath.replace("/", ""); const hrefTrimmed = href.toString().replace("/", ""); - const isCurrent = hrefTrimmed && pathTrimmed.includes(hrefTrimmed); + const isCurrent = + asPath === "/" + ? asPath === href + : hrefTrimmed && pathTrimmed.includes(hrefTrimmed); const classes = classNames(className, { [currentClassName]: isCurrent,