aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2018-08-23 10:27:35 +0800
committerDan Miller <danjm.com@gmail.com>2018-08-29 08:38:15 +0800
commit40e0d92f572d4fff14bfac9a2b0a64ffae8ec7c5 (patch)
tree47d6b83438cdc7e0cd3e7f0b5825de90d50a1136 /ui/app/reducers
parent4560df6e739b97caf95ef5bc5bc93f91e8c890bb (diff)
downloadtangerine-wallet-browser-40e0d92f572d4fff14bfac9a2b0a64ffae8ec7c5.tar.gz
tangerine-wallet-browser-40e0d92f572d4fff14bfac9a2b0a64ffae8ec7c5.tar.zst
tangerine-wallet-browser-40e0d92f572d4fff14bfac9a2b0a64ffae8ec7c5.zip
Adds sidebar component and refactors slide in wallet view sidebar to use it.
Diffstat (limited to 'ui/app/reducers')
-rw-r--r--ui/app/reducers/app.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index 7be9b8d40..5c86d397d 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -48,7 +48,11 @@ function reduceApp (state, action) {
name: null,
},
},
- sidebarOpen: false,
+ sidebar: {
+ isOpen: false,
+ transitionName: '',
+ type: '',
+ },
alertOpen: false,
alertMessage: null,
qrCodeData: null,
@@ -88,12 +92,18 @@ function reduceApp (state, action) {
// sidebar methods
case actions.SIDEBAR_OPEN:
return extend(appState, {
- sidebarOpen: true,
+ sidebar: {
+ ...action.value,
+ isOpen: true,
+ },
})
case actions.SIDEBAR_CLOSE:
return extend(appState, {
- sidebarOpen: false,
+ sidebar: {
+ ...appState.sidebar,
+ isOpen: false,
+ },
})
// alert methods