diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-22 16:35:33 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-22 16:35:33 +0200 |
| commit | 794a52e485e15e4bf86c849e135d49783c91539b (patch) | |
| tree | 1a06f56de34b43fddf0819ed554854c64d5255e3 /app/client/modules/pix2pixhd/pix2pixhd.reducer.js | |
| parent | cdcb1403e6ffeda50d0bb0ca5aab4ac68978069f (diff) | |
deletorrr
Diffstat (limited to 'app/client/modules/pix2pixhd/pix2pixhd.reducer.js')
| -rw-r--r-- | app/client/modules/pix2pixhd/pix2pixhd.reducer.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/client/modules/pix2pixhd/pix2pixhd.reducer.js b/app/client/modules/pix2pixhd/pix2pixhd.reducer.js index b6264ed..6b2366c 100644 --- a/app/client/modules/pix2pixhd/pix2pixhd.reducer.js +++ b/app/client/modules/pix2pixhd/pix2pixhd.reducer.js @@ -21,6 +21,18 @@ const pix2pixhdReducer = (state = pix2pixhdInitialState, action) => { ...state, results: action.results, } + case types.file.destroy: + console.log('file destroy', state.results) + if (! state.results) { + return state + } + return { + ...state, + results: { + ...state.results, + files: state.results.files.filter(file.id !== action.data.id) + } + } default: return state } |
