summaryrefslogtreecommitdiff
path: root/frontend/app/views/graph/graph.reducer.js
diff options
context:
space:
mode:
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
}