chore(sidebar): fix isActive check
This commit is contained in:
parent
c9ac6b9c55
commit
69fd24149a
|
@ -67,7 +67,9 @@ type Props = {
|
|||
export const SidebarComponent = ({ options, location, history }: Props) => (
|
||||
<Wrapper id='sidebar'>
|
||||
{(options || []).map((item) => {
|
||||
const isActive = location.pathname === item.route;
|
||||
const isActive = item.route === '/'
|
||||
? location.pathname === item.route
|
||||
: location.pathname.startsWith(item.route);
|
||||
|
||||
return (
|
||||
<StyledLink
|
||||
|
|
Loading…
Reference in New Issue