From cc36bb1ad49dc054b32f20a97386a938a529fe0e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 17 Jun 2018 21:16:57 +0200 Subject: pix2pixhd modules --- app/client/modules/pix2pixhd/pix2pixhd.reducer.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/client/modules/pix2pixhd/pix2pixhd.reducer.js (limited to 'app/client/modules/pix2pixhd/pix2pixhd.reducer.js') 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 -- cgit v1.2.3-70-g09d2