aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/dropdowns
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-09-30 03:03:29 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-10-03 09:09:09 +0800
commitd206f183f5a07787535acd196c506145f00a199e (patch)
tree22bb33f551d488ef92628296b8871cd7557d771c /ui/app/components/dropdowns
parent47ebcbb2ed09a4cd4b062c5fa4cb6d259369149f (diff)
downloadtangerine-wallet-browser-d206f183f5a07787535acd196c506145f00a199e.tar
tangerine-wallet-browser-d206f183f5a07787535acd196c506145f00a199e.tar.gz
tangerine-wallet-browser-d206f183f5a07787535acd196c506145f00a199e.tar.bz2
tangerine-wallet-browser-d206f183f5a07787535acd196c506145f00a199e.tar.lz
tangerine-wallet-browser-d206f183f5a07787535acd196c506145f00a199e.tar.xz
tangerine-wallet-browser-d206f183f5a07787535acd196c506145f00a199e.tar.zst
tangerine-wallet-browser-d206f183f5a07787535acd196c506145f00a199e.zip
Hide token confirmation modal ui
Diffstat (limited to 'ui/app/components/dropdowns')
-rw-r--r--ui/app/components/dropdowns/token-menu-dropdown.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/ui/app/components/dropdowns/token-menu-dropdown.js b/ui/app/components/dropdowns/token-menu-dropdown.js
index b948534c2..0f4bc2b87 100644
--- a/ui/app/components/dropdowns/token-menu-dropdown.js
+++ b/ui/app/components/dropdowns/token-menu-dropdown.js
@@ -1,8 +1,19 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
+const connect = require('react-redux').connect
+const actions = require('../../actions')
+
+module.exports = connect(null, mapDispatchToProps)(TokenMenuDropdown)
+
+function mapDispatchToProps (dispatch) {
+ return {
+ showHideTokenConfirmationModal: (token) => {
+ dispatch(actions.showModal({ name: 'HIDE_TOKEN_CONFIRMATION', token }))
+ }
+ }
+}
-module.exports = TokenMenuDropdown
inherits(TokenMenuDropdown, Component)
function TokenMenuDropdown () {
@@ -17,6 +28,8 @@ TokenMenuDropdown.prototype.onClose = function (e) {
}
TokenMenuDropdown.prototype.render = function () {
+ const { showHideTokenConfirmationModal } = this.props
+
return h('div.token-menu-dropdown', {}, [
h('div.token-menu-dropdown__close-area', {
onClick: this.onClose,
@@ -27,7 +40,7 @@ TokenMenuDropdown.prototype.render = function () {
h('div.token-menu-dropdown__option', {
onClick: (e) => {
e.stopPropagation()
- console.log('div.token-menu-dropdown__option!')
+ showHideTokenConfirmationModal(this.props.token)
},
}, 'Hide Token')
@@ -35,4 +48,3 @@ TokenMenuDropdown.prototype.render = function () {
]),
])
}
-