1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-31 19:30:53 +00:00

remove unnecessary switch from TopNavigationComponent

This commit is contained in:
Szymon Lesisz 2019-01-03 18:18:13 +01:00
parent 7d9857845f
commit b27e3af7f3

View File

@ -64,28 +64,17 @@ class TopNavigationAccount extends React.PureComponent<Props> {
const basePath = `/device/${state.device}/network/${state.network}/account/${state.account}`;
switch (network.type) {
case 'ethereum':
return (
<Wrapper className="account-tabs" ref={this.wrapperRefCallback}>
<StyledNavLink exact to={`${basePath}`}>Summary</StyledNavLink>
<StyledNavLink to={`${basePath}/receive`}>Receive</StyledNavLink>
<StyledNavLink to={`${basePath}/send`}>Send</StyledNavLink>
<StyledNavLink to={`${basePath}/signverify`}>Sign &amp; Verify</StyledNavLink>
<Indicator pathname={pathname} wrapper={() => this.wrapper} />
</Wrapper>
);
case 'ripple':
return (
<Wrapper className="account-tabs" ref={this.wrapperRefCallback}>
<StyledNavLink exact to={`${basePath}`}>Summary</StyledNavLink>
<StyledNavLink to={`${basePath}/receive`}>Receive</StyledNavLink>
<StyledNavLink to={`${basePath}/send`}>Send</StyledNavLink>
<Indicator pathname={pathname} wrapper={() => this.wrapper} />
</Wrapper>
);
default: return null;
}
return (
<Wrapper className="account-tabs" ref={this.wrapperRefCallback}>
<StyledNavLink exact to={`${basePath}`}>Summary</StyledNavLink>
<StyledNavLink to={`${basePath}/receive`}>Receive</StyledNavLink>
<StyledNavLink to={`${basePath}/send`}>Send</StyledNavLink>
{network.type === 'ethereum'
&& <StyledNavLink to={`${basePath}/signverify`}>Sign &amp; Verify</StyledNavLink>
}
<Indicator pathname={pathname} wrapper={() => this.wrapper} />
</Wrapper>
);
}
}