This commit is contained in:
mgabdev
2020-05-01 01:50:27 -04:00
parent c15d4f12dc
commit 8e349c368c
99 changed files with 1268 additions and 887 deletions

View File

@@ -51,8 +51,9 @@ export default class SidebarSectionItem extends PureComponent {
} = this.props
const { hovering } = this.state
const noRouter = !this.context.router
const iconSize = '16px'
const currentPathname = this.context.router ? this.context.router.route.location.pathname : undefined
const currentPathname = noRouter ? '' : this.context.router.route.location.pathname
const shouldShowActive = hovering || active || currentPathname === to || currentPathname === href
const isNotifications = to === '/notifications'
@@ -103,8 +104,8 @@ export default class SidebarSectionItem extends PureComponent {
return (
<Button
to={to}
href={href}
to={noRouter ? undefined : to}
href={noRouter ? (to || href) : href}
onClick={onClick}
noClasses
buttonRef={buttonRef}