chore(sidebar): fix isActive check

This commit is contained in:
George Lima 2019-02-14 19:17:13 -03:00
parent c9ac6b9c55
commit 69fd24149a
1 changed files with 3 additions and 1 deletions

View File

@ -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