aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/app.js
diff options
context:
space:
mode:
authorsdtsui <szehungdanieltsui@gmail.com>2017-08-07 10:03:38 +0800
committersdtsui <szehungdanieltsui@gmail.com>2017-08-07 10:03:38 +0800
commit7cb031eeb95f031935fcb3b9c000cbc8edc4ee92 (patch)
tree299435f56f342edd2e314dd8dc50f388fad8a7df /ui/app/app.js
parenta7017b824d108bbf81b8dbc994d451829c2413db (diff)
downloadtangerine-wallet-browser-7cb031eeb95f031935fcb3b9c000cbc8edc4ee92.tar
tangerine-wallet-browser-7cb031eeb95f031935fcb3b9c000cbc8edc4ee92.tar.gz
tangerine-wallet-browser-7cb031eeb95f031935fcb3b9c000cbc8edc4ee92.tar.bz2
tangerine-wallet-browser-7cb031eeb95f031935fcb3b9c000cbc8edc4ee92.tar.lz
tangerine-wallet-browser-7cb031eeb95f031935fcb3b9c000cbc8edc4ee92.tar.xz
tangerine-wallet-browser-7cb031eeb95f031935fcb3b9c000cbc8edc4ee92.tar.zst
tangerine-wallet-browser-7cb031eeb95f031935fcb3b9c000cbc8edc4ee92.zip
Add sidebar click handler to overlay
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index 6196040b6..339e13fd7 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -37,7 +37,7 @@ const HDRestoreVaultScreen = require('./keychains/hd/restore-vault')
const RevealSeedConfirmation = require('./keychains/hd/recover-seed/confirmation')
const ReactCSSTransitionGroup = require('react-addons-css-transition-group')
-module.exports = connect(mapStateToProps)(App)
+module.exports = connect(mapStateToProps, mapDispatchToProps)(App)
inherits(App, Component)
function App () { Component.call(this) }
@@ -67,6 +67,12 @@ function mapStateToProps (state) {
}
}
+function mapDispatchToProps (dispatch) {
+ return {
+ hideSidebar: () => {dispatch(actions.hideSidebar())},
+ }
+}
+
App.prototype.render = function () {
var props = this.props
const { isLoading, loadingMessage, transForward, network, sidebarOpen } = props
@@ -151,7 +157,10 @@ App.prototype.renderSidebar = function() {
// overlay
// TODO: add onClick for overlay to close sidebar
this.props.sidebarOpen ? h('div.sidebar-overlay', {
- style: {}
+ style: {},
+ onClick: () => {
+ this.props.hideSidebar()
+ },
}, []) : undefined,
])
}