diff options
Diffstat (limited to 'app/client/modules/samplernn/samplernn.reducer.js')
| -rw-r--r-- | app/client/modules/samplernn/samplernn.reducer.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/app/client/modules/samplernn/samplernn.reducer.js b/app/client/modules/samplernn/samplernn.reducer.js new file mode 100644 index 0000000..a642919 --- /dev/null +++ b/app/client/modules/samplernn/samplernn.reducer.js @@ -0,0 +1,32 @@ +import types from '../../types' + +const samplernnInitialState = { + loading: false, + error: null, + datasets: [], + results: [], +} + +const samplernnReducer = (state = samplernnInitialState, action) => { + switch(action.type) { + case types.socket.connect: + return { + ...state, + } + case types.task.task_begin: + return { + ...state, + } + case types.task.task_finish: + if (state.runner[action.task.processor].task.uuid !== action.task.uuid) { + return state + } + return { + ...state, + } + default: + return state + } +} + +export default samplernnReducer |
