mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
Better handling of menu rendering
This commit is contained in:
parent
089aa0e829
commit
160210890f
@ -150,22 +150,19 @@ class LeftNavigation extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { selectedDevice } = this.props.wallet;
|
|
||||||
return (
|
return (
|
||||||
<StickyContainer
|
<StickyContainer
|
||||||
location={this.props.location.pathname}
|
location={this.props.location.pathname}
|
||||||
deviceSelection={this.props.deviceDropdownOpened}
|
deviceSelection={this.props.deviceDropdownOpened}
|
||||||
>
|
>
|
||||||
{selectedDevice && (
|
<DeviceHeader
|
||||||
<DeviceHeader
|
onClickWrapper={() => this.handleOpen()}
|
||||||
onClickWrapper={() => this.handleOpen()}
|
device={this.props.wallet.selectedDevice}
|
||||||
device={this.props.wallet.selectedDevice}
|
transport={this.props.connect.transport}
|
||||||
transport={this.props.connect.transport}
|
devices={this.props.devices}
|
||||||
devices={this.props.devices}
|
isOpen={this.props.deviceDropdownOpened}
|
||||||
isOpen={this.props.deviceDropdownOpened}
|
{...this.props}
|
||||||
{...this.props}
|
/>
|
||||||
/>
|
|
||||||
) }
|
|
||||||
<MenuWrapper>
|
<MenuWrapper>
|
||||||
{this.state.shouldRenderDeviceSelection && <DeviceMenu {...this.props} />}
|
{this.state.shouldRenderDeviceSelection && <DeviceMenu {...this.props} />}
|
||||||
{this.shouldRenderAccounts() && this.getMenuTransition(<AccountMenu {...this.props} />)}
|
{this.shouldRenderAccounts() && this.getMenuTransition(<AccountMenu {...this.props} />)}
|
||||||
|
@ -83,7 +83,7 @@ const Wallet = (props: WalletContainerProps) => (
|
|||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
<Header />
|
<Header />
|
||||||
<WalletWrapper>
|
<WalletWrapper>
|
||||||
<LeftNavigation />
|
{props.wallet.selectedDevice && <LeftNavigation />}
|
||||||
<MainContent>
|
<MainContent>
|
||||||
<Navigation>
|
<Navigation>
|
||||||
<Route path="/device/:device/network/:network/account/:account" component={TopNavigationAccount} />
|
<Route path="/device/:device/network/:network/account/:account" component={TopNavigationAccount} />
|
||||||
|
Loading…
Reference in New Issue
Block a user