diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-06 01:27:02 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-06 01:27:02 +0200 |
| commit | 2538fbd5471a61d51742281df0e019a2dd4ea24e (patch) | |
| tree | 89f877a86205412b7bf044cd8034ee6c350f204c /app/client/modules/pix2wav/pix2wav.reducer.js | |
| parent | d3fcd1212f7214b12b04a83d03dfb129c5fbb0a4 (diff) | |
consolidate
Diffstat (limited to 'app/client/modules/pix2wav/pix2wav.reducer.js')
| -rw-r--r-- | app/client/modules/pix2wav/pix2wav.reducer.js | 31 |
1 files changed, 6 insertions, 25 deletions
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 } |
