summaryrefslogtreecommitdiff
path: root/frontend/views/page/page.reducer.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-06-10 14:19:35 +0200
committerJules Laplace <julescarbon@gmail.com>2020-06-10 14:19:35 +0200
commit9a1cac006a80098f90f2febf751632c7e5ffbfa0 (patch)
treecb255601d15b4deef59f3162407412681c5ac7de /frontend/views/page/page.reducer.js
parent107bf7b019215634741b11dbf07fc23c65a072b6 (diff)
setting page background color
Diffstat (limited to 'frontend/views/page/page.reducer.js')
-rw-r--r--frontend/views/page/page.reducer.js14
1 files changed, 13 insertions, 1 deletions
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,
}
}
}