From d3705a588e3a790868082dbf9590163b8016a94c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 4 Jun 2018 19:52:59 +0200 Subject: adding folders... check --- app/client/modules/samplernn/samplernn.reducer.js | 25 +++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'app/client') diff --git a/app/client/modules/samplernn/samplernn.reducer.js b/app/client/modules/samplernn/samplernn.reducer.js index 929205e..a41894f 100644 --- a/app/client/modules/samplernn/samplernn.reducer.js +++ b/app/client/modules/samplernn/samplernn.reducer.js @@ -43,12 +43,18 @@ const samplernnReducer = (state = samplernnInitialState, action) => { return { ...state, loading: false, - // folder: { - // ...action.data, - // input: [], - // checkpoints: [], - // output: [], - // } + data: { + folders: state.data.folders.concat([action.data.id]), + folderLookup: { + ...state.data.folderLookup, + [...action.data.id]: action.data, + } + }, + folder: { + ...action.data, + datasets: [], + files: [], + }, } } return state @@ -59,6 +65,13 @@ const samplernnReducer = (state = samplernnInitialState, action) => { return { ...state, loading: false, + data: { + files: state.data.files.concat([action.data.id]), + fileLookup: { + ...state.data.fileLookup, + [...action.data.id]: action.data, + } + } folder: { ...state.folder, files: [ -- cgit v1.2.3-70-g09d2