Remove another warning

This commit is contained in:
Tom Moor
2017-11-10 14:11:02 -08:00
parent 8056a784f6
commit c737b613e4

View File

@@ -41,14 +41,6 @@ const StyledNavLink = styled(NavLink)`
&:hover { &:hover {
color: ${color.text}; color: ${color.text};
} }
&.active {
${IconWrapper} & {
svg {
fill: ${({ iconColor }) => (iconColor ? iconColor : activeStyle.color)}
}
}
}
`; `;
const StyledDiv = StyledNavLink.withComponent('div'); const StyledDiv = StyledNavLink.withComponent('div');
@@ -86,16 +78,17 @@ type Props = {
}; };
render() { render() {
const { icon, children, expandedContent, ...rest } = this.props; const { icon, children, onClick, to, expandedContent } = this.props;
const Component = rest.to ? StyledNavLink : StyledDiv; const Component = to ? StyledNavLink : StyledDiv;
return ( return (
<Flex column> <Flex column>
<Component <Component
exact
activeStyle={activeStyle} activeStyle={activeStyle}
hasChildren={expandedContent} hasChildren={expandedContent}
{...rest} onClick={onClick}
to={to}
exact
> >
{icon && <IconWrapper>{icon}</IconWrapper>} {icon && <IconWrapper>{icon}</IconWrapper>}
{expandedContent && {expandedContent &&