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 {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user