aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/account-menu
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2017-12-04 14:24:30 +0800
committerAlexander Tseung <alextsg@gmail.com>2017-12-15 06:11:23 +0800
commitdde39e82b5723ba8056b73f0f823d40c3e702a99 (patch)
tree4143756e6660ac16b896a58dffef612f99770fd5 /ui/app/components/account-menu
parente226b10a89d87af07c7c35ff1251a8264f3bb1b8 (diff)
downloadtangerine-wallet-browser-dde39e82b5723ba8056b73f0f823d40c3e702a99.tar.gz
tangerine-wallet-browser-dde39e82b5723ba8056b73f0f823d40c3e702a99.tar.zst
tangerine-wallet-browser-dde39e82b5723ba8056b73f0f823d40c3e702a99.zip
Add routes for mascara
Diffstat (limited to 'ui/app/components/account-menu')
-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),