summaryrefslogtreecommitdiff
path: root/frontend/app/views/graph/graph.reducer.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-03-17 18:11:26 +0100
committerJules Laplace <julescarbon@gmail.com>2021-03-17 18:11:26 +0100
commitd165a0727e42349d935ab3ee287242f1e5029742 (patch)
treeb4fa68209127efdd4eb46c82eaef280535692611 /frontend/app/views/graph/graph.reducer.js
parent92566ba17f5e921d5bff1f3fb4e4b0d92ca4fd39 (diff)
frontend. export/view button. interactivity sanity check
Diffstat (limited to 'frontend/app/views/graph/graph.reducer.js')
-rw-r--r--frontend/app/views/graph/graph.reducer.js14
1 files changed, 14 insertions, 0 deletions
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
}