aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/account-menu/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/account-menu/index.js')
-rw-r--r--ui/app/components/account-menu/index.js22
1 files changed, 5 insertions, 17 deletions
diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js
index 0965cba38..0d3b43ae9 100644
--- a/ui/app/components/account-menu/index.js
+++ b/ui/app/components/account-menu/index.js
@@ -8,7 +8,7 @@ const actions = require('../../actions')
const { Menu, Item, Divider, CloseArea } = require('../dropdowns/components/menu')
const Identicon = require('../identicon')
const { formatBalance } = require('../../util')
-const { SETTINGS_ROUTE, INFO_ROUTE, IMPORT_ACCOUNT_ROUTE } = require('../../routes')
+const { SETTINGS_ROUTE, INFO_ROUTE, IMPORT_ACCOUNT_ROUTE, DEFAULT_ROUTE } = require('../../routes')
module.exports = compose(
withRouter,
@@ -40,22 +40,10 @@ function mapDispatchToProps (dispatch) {
dispatch(actions.displayWarning(null))
dispatch(actions.toggleAccountMenu())
},
- showConfigPage: () => {
- dispatch(actions.showConfigPage())
- dispatch(actions.toggleAccountMenu())
- },
showNewAccountModal: () => {
dispatch(actions.showModal({ name: 'NEW_ACCOUNT' }))
dispatch(actions.toggleAccountMenu())
},
- showImportPage: () => {
- dispatch(actions.showImportPage())
- dispatch(actions.toggleAccountMenu())
- },
- showInfoPage: () => {
- dispatch(actions.showInfoPage())
- dispatch(actions.toggleAccountMenu())
- },
}
}
@@ -64,10 +52,7 @@ AccountMenu.prototype.render = function () {
isAccountMenuOpen,
toggleAccountMenu,
showNewAccountModal,
- showImportPage,
lockMetamask,
- showConfigPage,
- showInfoPage,
history,
} = this.props
@@ -78,7 +63,10 @@ AccountMenu.prototype.render = function () {
}, [
'My Accounts',
h('button.account-menu__logout-button', {
- onClick: lockMetamask,
+ onClick: () => {
+ lockMetamask()
+ history.push(DEFAULT_ROUTE)
+ },
}, 'Log out'),
]),
h(Divider),