From 2538fbd5471a61d51742281df0e019a2dd4ea24e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 6 Jun 2018 01:27:02 +0200 Subject: consolidate --- app/client/modules/pix2wav/pix2wav.reducer.js | 31 ++++++--------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'app/client/modules/pix2wav/pix2wav.reducer.js') diff --git a/app/client/modules/pix2wav/pix2wav.reducer.js b/app/client/modules/pix2wav/pix2wav.reducer.js index 6d6548a..0b55b07 100644 --- a/app/client/modules/pix2wav/pix2wav.reducer.js +++ b/app/client/modules/pix2wav/pix2wav.reducer.js @@ -1,39 +1,20 @@ import types from '../../types' +import datasetReducer from '../../dataset/dataset.reducer' const pix2wavInitialState = { loading: true, + progress: { i: 0, n: 0 }, error: null, - folders: [], folder_id: 0, data: null, - lossReport: null, } const pix2wavReducer = (state = pix2wavInitialState, action) => { - // console.log(action.type) - switch(action.type) { - case types.pix2wav.init: - return { - ...state, - loading: false, - data: action.data, - } - - case types.socket.connect: - return { - ...state, - } - - case types.task.task_begin: - return { - ...state, - } - - case types.task.task_finish: - return { - ...state, - } + if (action.data && action.data.module === 'pix2wav') { + state = datasetReducer(state, action) + } + switch (action.type) { default: return state } -- cgit v1.2.3-70-g09d2