fixed navitem highlight bug

This commit is contained in:
Sendou
2020-04-13 18:39:19 +03:00
parent 7813af3d76
commit 77bafaa575

View File

@@ -17,7 +17,7 @@ const NavItem: React.FC<NavItemProps> = ({ to, icon, title }) => {
const location = useLocation()
const isActive =
location.pathname.indexOf(to) !== -1 && location.pathname !== "/"
location.pathname.indexOf("/" + to) !== -1 && location.pathname !== "/"
return (
<ListItem>