diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 19:18:56 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 19:18:56 +0200 |
| commit | 9f81aab18011637ac8daf4cdcf7223ee636a4663 (patch) | |
| tree | f38bf3f711f9838909ff1b5a8f1a8fe1ef922734 /app/client/modules/pix2pix/pix2pix.reducer.js | |
| parent | f827f34c60d8660abfe22faf091b79e8220eb0fa (diff) | |
boilerplate for p2p/p2w
Diffstat (limited to 'app/client/modules/pix2pix/pix2pix.reducer.js')
| -rw-r--r-- | app/client/modules/pix2pix/pix2pix.reducer.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/app/client/modules/pix2pix/pix2pix.reducer.js b/app/client/modules/pix2pix/pix2pix.reducer.js new file mode 100644 index 0000000..fbd38d1 --- /dev/null +++ b/app/client/modules/pix2pix/pix2pix.reducer.js @@ -0,0 +1,42 @@ +import types from '../../types' + +const pix2pixInitialState = { + loading: true, + error: null, + folders: [], + folder_id: 0, + data: null, + lossReport: null, +} + +const pix2pixReducer = (state = pix2pixInitialState, action) => { + // console.log(action.type) + switch(action.type) { + case types.pix2pix.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, + } + + default: + return state + } +} + +export default pix2pixReducer |
