Remove another warning
This commit is contained in:
@@ -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 &&
|
||||||
|
|||||||
Reference in New Issue
Block a user