Closes #667 - React warning in development
This commit is contained in:
@ -33,7 +33,7 @@ const StyledNavLink = styled(NavLink)`
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
margin-left: ${({ iconVisible }) => (iconVisible ? '-20px;' : '0')};
|
margin-left: ${({ icon }) => (icon ? '-20px;' : '0')};
|
||||||
color: ${color.slateDark};
|
color: ${color.slateDark};
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -97,12 +97,13 @@ class SidebarLink extends React.Component<Props> {
|
|||||||
hideExpandToggle,
|
hideExpandToggle,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const Component = to ? StyledNavLink : StyledDiv;
|
const Component = to ? StyledNavLink : StyledDiv;
|
||||||
const showExpandIcon = expandedContent && !hideExpandToggle;
|
const showExpandIcon =
|
||||||
|
expandedContent && !hideExpandToggle ? true : undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Wrapper menuOpen={menuOpen} column>
|
<Wrapper menuOpen={menuOpen} column>
|
||||||
<Component
|
<Component
|
||||||
iconVisible={showExpandIcon}
|
icon={showExpandIcon}
|
||||||
activeStyle={activeStyle}
|
activeStyle={activeStyle}
|
||||||
style={active ? activeStyle : undefined}
|
style={active ? activeStyle : undefined}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
|
Reference in New Issue
Block a user