1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-13 01:20:59 +00:00

Fixed component

This commit is contained in:
Vladimir Volek 2018-10-10 13:58:15 +02:00 committed by Szymon Lesisz
parent 453cda908f
commit 14904bff99

View File

@ -47,7 +47,7 @@ const StyledNavLink = styled(NavLink)`
class Link extends Component {
render() {
const shouldRenderRouterLink = !!this.this.to;
const shouldRenderRouterLink = this.props.to;
let LinkComponent;
if (shouldRenderRouterLink) {
LinkComponent = (
@ -55,7 +55,8 @@ class Link extends Component {
isGreen={this.props.isGreen}
isGray={this.props.isGray}
to={this.props.to}
/>);
>{this.props.children}
</StyledNavLink>);
} else {
LinkComponent = (
<A
@ -70,7 +71,8 @@ class Link extends Component {
</A>
);
}
return (<LinkComponent />);
return LinkComponent;
}
}