diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-28 20:18:20 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-28 20:18:20 +0200 |
| commit | 84aca1791d43ae5a65bd88747636e418b380ad64 (patch) | |
| tree | f56687c992bb6dc3956e8744be8030a48f00d95e /app/client/modules/samplernn/samplernn.reducer.js | |
| parent | c248031739699775477c838f8e836fedf243c720 (diff) | |
reconsidering datasets component... stub in api client
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 |
