diff options
author | Alexander Tseung <alextsg@gmail.com> | 2017-10-16 13:27:51 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-16 13:43:27 +0800 |
commit | 7caa9142235cc0eca20d638a066d666d8cfaabee (patch) | |
tree | ddd68a41d546e9733520c49c2018009b9093bd4b /ui/app | |
parent | a9244f5e426d6572ef135e07ab75a49c00e84942 (diff) | |
download | tangerine-wallet-browser-7caa9142235cc0eca20d638a066d666d8cfaabee.tar tangerine-wallet-browser-7caa9142235cc0eca20d638a066d666d8cfaabee.tar.gz tangerine-wallet-browser-7caa9142235cc0eca20d638a066d666d8cfaabee.tar.bz2 tangerine-wallet-browser-7caa9142235cc0eca20d638a066d666d8cfaabee.tar.lz tangerine-wallet-browser-7caa9142235cc0eca20d638a066d666d8cfaabee.tar.xz tangerine-wallet-browser-7caa9142235cc0eca20d638a066d666d8cfaabee.tar.zst tangerine-wallet-browser-7caa9142235cc0eca20d638a066d666d8cfaabee.zip |
Fix Import Account link not hiding sidebar
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/components/dropdowns/components/account-dropdowns.js | 9 | ||||
-rw-r--r-- | ui/app/components/wallet-view.js | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ui/app/components/dropdowns/components/account-dropdowns.js b/ui/app/components/dropdowns/components/account-dropdowns.js index fc60c6005..e2eed1e4b 100644 --- a/ui/app/components/dropdowns/components/account-dropdowns.js +++ b/ui/app/components/dropdowns/components/account-dropdowns.js @@ -164,7 +164,7 @@ class AccountDropdowns extends Component { } renderAccountSelector () { - const { actions, useCssTransition, innerStyle } = this.props + const { actions, useCssTransition, innerStyle, sidebarOpen } = this.props const { accountSelectorActive, menuItemStyles } = this.state return h( @@ -223,7 +223,11 @@ class AccountDropdowns extends Component { h( DropdownMenuItem, { - closeMenu: () => {}, + closeMenu: () => { + if (sidebarOpen) { + actions.hideSidebar() + } + }, onClick: () => actions.showImportPage(), style: Object.assign( {}, @@ -457,6 +461,7 @@ const mapDispatchToProps = (dispatch) => { function mapStateToProps (state) { return { keyrings: state.metamask.keyrings, + sidebarOpen: state.appState.sidebarOpen, } } diff --git a/ui/app/components/wallet-view.js b/ui/app/components/wallet-view.js index 00c86298d..54d90b7ac 100644 --- a/ui/app/components/wallet-view.js +++ b/ui/app/components/wallet-view.js @@ -45,8 +45,9 @@ WalletView.prototype.renderWalletBalance = function () { selectedAccount, unsetSelectedToken, hideSidebar, - sidebarOpen + sidebarOpen, } = this.props + const selectedClass = selectedTokenAddress ? '' : 'wallet-balance-wrapper--active' |