From d165a0727e42349d935ab3ee287242f1e5029742 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 17 Mar 2021 18:11:26 +0100 Subject: frontend. export/view button. interactivity sanity check --- frontend/app/views/graph/graph.reducer.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'frontend/app/views/graph/graph.reducer.js') diff --git a/frontend/app/views/graph/graph.reducer.js b/frontend/app/views/graph/graph.reducer.js index 30049b5..725c256 100644 --- a/frontend/app/views/graph/graph.reducer.js +++ b/frontend/app/views/graph/graph.reducer.js @@ -8,6 +8,7 @@ const initialState = crudState('graph', { addingPage: false, editingPage: false, showingAudio: false, + building: false, }, options: { } @@ -125,6 +126,19 @@ export default function graphReducer(state = initialState, action) { } } + case types.api.loading: + if (action.tag !== 'view' && action.tag !== 'export') { + return state + } + return { ...state, editor: { ...state.editor, building: action.tag } } + + case types.api.loaded: + case types.api.error: + if (action.tag !== 'view' && action.tag !== 'export') { + return state + } + return { ...state, editor: { ...state.editor, building: null } } + default: return state } -- cgit v1.2.3-70-g09d2