From 9a1cac006a80098f90f2febf751632c7e5ffbfa0 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 10 Jun 2020 14:19:35 +0200 Subject: setting page background color --- frontend/views/page/page.reducer.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'frontend/views/page/page.reducer.js') diff --git a/frontend/views/page/page.reducer.js b/frontend/views/page/page.reducer.js index 7bffe8e..2d80551 100644 --- a/frontend/views/page/page.reducer.js +++ b/frontend/views/page/page.reducer.js @@ -34,13 +34,25 @@ export default function pageReducer(state = initialState, action) { } case types.page.update: + console.log(action.data.res, state.show.res) + if (state.show.res && state.show.res.id === action.data.res.id) { + return { + ...state, + show: { + ...state.show, + res: { + ...action.data.res, + tiles: state.show.res.tiles, + } + } + } + } return { ...state, show: { ...state.show, res: { ...action.data.res, - tiles: state.show.res.tiles, } } } -- cgit v1.2.3-70-g09d2