diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-03 16:39:41 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-03 16:39:41 +0200 |
| commit | 167c45fdf39c7566906a562522981b7335284ad2 (patch) | |
| tree | eb86cae865147354f678aa9b8b88b61b6d68f56d /app/client/modules/samplernn/samplernn.reducer.js | |
| parent | 1809865b4f5ad58058af8ec23a8d07cb5597d7b2 (diff) | |
neeeeeeeed to append files to this ridiculous data structure now
Diffstat (limited to 'app/client/modules/samplernn/samplernn.reducer.js')
| -rw-r--r-- | app/client/modules/samplernn/samplernn.reducer.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/client/modules/samplernn/samplernn.reducer.js b/app/client/modules/samplernn/samplernn.reducer.js index 524d650..4084d48 100644 --- a/app/client/modules/samplernn/samplernn.reducer.js +++ b/app/client/modules/samplernn/samplernn.reducer.js @@ -50,12 +50,22 @@ const samplernnReducer = (state = samplernnInitialState, action) => { case types.file.create: if (state.folder.id === action.data.folder_id) { + console.log(action.data, state.folder) return { ...state, loading: false, folder: { ...state.folder, - input: [action.data].concat(state.folder.input), + datasets: [ + ...state.folder.datasets, + { + name: action.data.name, + date: action.data.date, + input: [action.data].concat(state.folder.input), + output: [], + checkpoints: [], + } + ], }, } } |
