1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-28 03:08:30 +00:00

Better handling of menu rendering

This commit is contained in:
Vladimir Volek 2018-09-10 16:03:09 +02:00
parent 089aa0e829
commit 160210890f
2 changed files with 9 additions and 12 deletions

View File

@ -150,22 +150,19 @@ class LeftNavigation extends Component {
}
render() {
const { selectedDevice } = this.props.wallet;
return (
<StickyContainer
location={this.props.location.pathname}
deviceSelection={this.props.deviceDropdownOpened}
>
{selectedDevice && (
<DeviceHeader
onClickWrapper={() => this.handleOpen()}
device={this.props.wallet.selectedDevice}
transport={this.props.connect.transport}
devices={this.props.devices}
isOpen={this.props.deviceDropdownOpened}
{...this.props}
/>
) }
<DeviceHeader
onClickWrapper={() => this.handleOpen()}
device={this.props.wallet.selectedDevice}
transport={this.props.connect.transport}
devices={this.props.devices}
isOpen={this.props.deviceDropdownOpened}
{...this.props}
/>
<MenuWrapper>
{this.state.shouldRenderDeviceSelection && <DeviceMenu {...this.props} />}
{this.shouldRenderAccounts() && this.getMenuTransition(<AccountMenu {...this.props} />)}

View File

@ -83,7 +83,7 @@ const Wallet = (props: WalletContainerProps) => (
<AppWrapper>
<Header />
<WalletWrapper>
<LeftNavigation />
{props.wallet.selectedDevice && <LeftNavigation />}
<MainContent>
<Navigation>
<Route path="/device/:device/network/:network/account/:account" component={TopNavigationAccount} />