1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-03 21:00:55 +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}`; const basePath = `/device/${state.device}/network/${state.network}/account/${state.account}`;
switch (network.type) { return (
case 'ethereum': <Wrapper className="account-tabs" ref={this.wrapperRefCallback}>
return ( <StyledNavLink exact to={`${basePath}`}>Summary</StyledNavLink>
<Wrapper className="account-tabs" ref={this.wrapperRefCallback}> <StyledNavLink to={`${basePath}/receive`}>Receive</StyledNavLink>
<StyledNavLink exact to={`${basePath}`}>Summary</StyledNavLink> <StyledNavLink to={`${basePath}/send`}>Send</StyledNavLink>
<StyledNavLink to={`${basePath}/receive`}>Receive</StyledNavLink> {network.type === 'ethereum'
<StyledNavLink to={`${basePath}/send`}>Send</StyledNavLink> && <StyledNavLink to={`${basePath}/signverify`}>Sign &amp; Verify</StyledNavLink>
<StyledNavLink to={`${basePath}/signverify`}>Sign &amp; Verify</StyledNavLink> }
<Indicator pathname={pathname} wrapper={() => this.wrapper} /> <Indicator pathname={pathname} wrapper={() => this.wrapper} />
</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;
}
} }
} }