mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-13 01:20:59 +00:00
Fixed component
This commit is contained in:
parent
453cda908f
commit
14904bff99
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user