diff options
Diffstat (limited to 'frontend/views/index/graph.reducer.js')
| -rw-r--r-- | frontend/views/index/graph.reducer.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/frontend/views/index/graph.reducer.js b/frontend/views/index/graph.reducer.js index 612ac14..7e573e1 100644 --- a/frontend/views/index/graph.reducer.js +++ b/frontend/views/index/graph.reducer.js @@ -4,6 +4,9 @@ import * as types from '../../types' import { crudState, crudReducer } from '../../api/crud.reducer' const initialState = crudState('graph', { + editor: { + addingPage: true, + }, options: { } }) @@ -14,6 +17,24 @@ export default function graphReducer(state = initialState, action) { // console.log(action.type, action) state = reducer(state, action) switch (action.type) { + case types.graph.show_add_page_form: + return { + ...state, + editor: { + ...state.editor, + addingPage: true, + } + } + + case types.graph.hide_add_page_form: + return { + ...state, + editor: { + ...state.editor, + addingPage: false, + } + } + default: return state } |
