diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-02 13:02:47 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-02 13:02:47 +0200 |
| commit | a6a529a5757417906f6df60ca7557fac3a380966 (patch) | |
| tree | 2791fccff9c24035da59106fb7bfcdefd444186a /app/client/modules/samplernn/samplernn.reducer.js | |
| parent | 4d6835094db8d3171d2ba42967a1dff9e622055a (diff) | |
work out data relationships for samplernn
Diffstat (limited to 'app/client/modules/samplernn/samplernn.reducer.js')
| -rw-r--r-- | app/client/modules/samplernn/samplernn.reducer.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/app/client/modules/samplernn/samplernn.reducer.js b/app/client/modules/samplernn/samplernn.reducer.js index 8d1ed74..5e83e98 100644 --- a/app/client/modules/samplernn/samplernn.reducer.js +++ b/app/client/modules/samplernn/samplernn.reducer.js @@ -1,20 +1,10 @@ import types from '../../types' const samplernnInitialState = { - loading: false, + loading: true, error: null, - folder: {}, folders: [], - datasets: [], - results: [], - input: { - folder: {}, - files: [], - }, - output: { - folder: {}, - files: [], - }, + folder: {}, data: null, } @@ -23,6 +13,7 @@ const samplernnReducer = (state = samplernnInitialState, action) => { case types.samplernn.init: return { ...state, + loading: false, data: action.data, } case types.socket.connect: @@ -55,6 +46,13 @@ const samplernnReducer = (state = samplernnInitialState, action) => { return state case types.socket.status: return samplernnSocket(state, action.data) + + case types.samplernn.set_folder: + return { + ...state, + folder: action.folder, + } + default: return state } |
