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

Fixed rendering function

This commit is contained in:
Vladimir Volek 2018-08-16 21:11:01 +02:00
parent dcbdf2bfa1
commit 50f8a182e6

View File

@ -81,8 +81,9 @@ class LeftNavigation extends Component {
} }
shouldRenderAccounts() { shouldRenderAccounts() {
const { network } = this.props.location;
const { selectedDevice } = this.props.wallet; const { selectedDevice } = this.props.wallet;
return selectedDevice && !this.state.shouldRenderDeviceSelection && this.state.animationType === 'slide-left'; return selectedDevice && network && !this.state.shouldRenderDeviceSelection && this.state.animationType === 'slide-left';
} }
shouldRenderCoins() { shouldRenderCoins() {
@ -98,8 +99,8 @@ class LeftNavigation extends Component {
<DeviceSelect {...this.props} /> <DeviceSelect {...this.props} />
<MenuWrapper> <MenuWrapper>
{this.state.shouldRenderDeviceSelection && this.getMenuTransition(<DeviceDropdown {...this.props} />) } {this.state.shouldRenderDeviceSelection && this.getMenuTransition(<DeviceDropdown {...this.props} />) }
{/* {this.shouldRenderAccounts && this.getMenuTransition(<AccountMenu key="accounts" {...this.props} />)} */} {this.shouldRenderAccounts() && this.getMenuTransition(<AccountMenu {...this.props} />)}
{this.shouldRenderCoins && <CoinMenu key="coins" {...this.props} />} {this.shouldRenderCoins() && <CoinMenu {...this.props} />}
</MenuWrapper> </MenuWrapper>
<StickyBottom> <StickyBottom>
<Help className="help"> <Help className="help">