Server-side render is-active for crawler

This commit is contained in:
Ines Montani 2019-03-14 11:46:27 +01:00
parent 39ace04b55
commit a0813b93e0

View File

@ -54,6 +54,7 @@ const Sidebar = ({ items, pageMenu, slug }) => {
const active = isActive || slug === url const active = isActive || slug === url
const itemClassNames = classNames(classes.link, { const itemClassNames = classNames(classes.link, {
[classes.isActive]: active, [classes.isActive]: active,
'is-active': classes.isActive,
}) })
return ( return (
@ -62,7 +63,6 @@ const Sidebar = ({ items, pageMenu, slug }) => {
to={url} to={url}
onClick={onClick} onClick={onClick}
className={itemClassNames} className={itemClassNames}
activeClassName={classNames('is-active', classes.isActive)}
hideIcon hideIcon
> >
{text} {text}