diff options
Diffstat (limited to 'app/client/modules/pix2pixhd/pix2pixhd.reducer.js')
| -rw-r--r-- | app/client/modules/pix2pixhd/pix2pixhd.reducer.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/client/modules/pix2pixhd/pix2pixhd.reducer.js b/app/client/modules/pix2pixhd/pix2pixhd.reducer.js new file mode 100644 index 0000000..a21f4d5 --- /dev/null +++ b/app/client/modules/pix2pixhd/pix2pixhd.reducer.js @@ -0,0 +1,23 @@ +import types from '../../types' +import datasetReducer from '../../dataset/dataset.reducer' + +const pix2pixhdInitialState = { + loading: true, + progress: { i: 0, n: 0 }, + error: null, + folder_id: 0, + data: null, +} + +const pix2pixhdReducer = (state = pix2pixhdInitialState, action) => { + if (action.data && action.data.module === 'pix2pixhd') { + state = datasetReducer(state, action) + } + + switch (action.type) { + default: + return state + } +} + +export default pix2pixhdReducer |
