From 0a341a1f6e1d805143dc13e56bc67394840118b4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 10 Jul 2020 20:37:19 +0200 Subject: updating home page works --- frontend/api/crud.reducer.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'frontend/api') 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 { -- cgit v1.2.3-70-g09d2