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