From 4cd33453dc14ae9e6a797c16cccb52598904941a Mon Sep 17 00:00:00 2001 From: sdtsui Date: Sun, 13 Aug 2017 22:15:21 +0200 Subject: [WIP] Extract network dropdown into own component --- ui/app/reducers/app.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'ui/app/reducers') diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 878852bf6..3e74fb732 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -38,6 +38,7 @@ function reduceApp (state, action) { menuOpen: false, modalOpen: false, sidebarOpen: false, + networkDropdownOpen: false, currentView: seedWords ? seedConfView : defaultView, accountDetail: { subview: 'transactions', @@ -51,6 +52,17 @@ function reduceApp (state, action) { }, state.appState) switch (action.type) { + // dropdown methods + case actions.NETWORK_DROPDOWN_OPEN: + return extend(appState, { + networkDropdownOpen: true, + }) + + case actions.NETWORK_DROPDOWN_CLOSE: + return extend(appState, { + networkDropdownOpen: false, + }) + // sidebar methods case actions.SIDEBAR_OPEN: return extend(appState, { @@ -74,7 +86,6 @@ function reduceApp (state, action) { }) // transition methods - case actions.TRANSITION_FORWARD: return extend(appState, { transForward: true, -- cgit v1.2.3