diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-07-10 20:37:19 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-07-10 20:37:19 +0200 |
| commit | 0a341a1f6e1d805143dc13e56bc67394840118b4 (patch) | |
| tree | ae9e014459d7cd6de0178002dad43128b6f0df52 /frontend/api/crud.reducer.js | |
| parent | 3545b13fec6f041bb72ab7f355d16fc6eeec7032 (diff) | |
updating home page works
Diffstat (limited to 'frontend/api/crud.reducer.js')
| -rw-r--r-- | frontend/api/crud.reducer.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/frontend/api/crud.reducer.js b/frontend/api/crud.reducer.js index 04ade91..baf2536 100644 --- a/frontend/api/crud.reducer.js +++ b/frontend/api/crud.reducer.js @@ -114,6 +114,13 @@ export const crudReducer = (type) => { return { ...state, update: action.data, + index: addToIndex(state.index, action.data.res, state.options.sort), + show: { + res: (state.show.res.id === action.data.res.id ? { + ...state.show.res, + ...action.data.res, + } : state.show.res), + } } case crud_type.index_error: return { |
