summaryrefslogtreecommitdiff
path: root/frontend/views/page/components/page.editor.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-06-14 19:56:33 +0200
committerJules Laplace <julescarbon@gmail.com>2020-06-14 19:56:33 +0200
commitff134ba1809fe3f96b806051ac6f4afb52c4304e (patch)
treed50778ab72825d0bd6eeccd769b211a46fba87b1 /frontend/views/page/components/page.editor.js
parenteb5136e2023fb0999995befff60624d5d4c51c94 (diff)
properly sorting and deleting tiles
Diffstat (limited to 'frontend/views/page/components/page.editor.js')
-rw-r--r--frontend/views/page/components/page.editor.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontend/views/page/components/page.editor.js b/frontend/views/page/components/page.editor.js
index 24e2075..bee86a0 100644
--- a/frontend/views/page/components/page.editor.js
+++ b/frontend/views/page/components/page.editor.js
@@ -152,6 +152,7 @@ class PageEditor extends Component {
this.props.tileActions.updateTemporaryTile(updatedTile)
}
if (tile.id !== 'new') {
+ console.log(updatedTile)
this.props.pageActions.updatePageTile(updatedTile)
actions.tile.update(updatedTile)
}
@@ -167,7 +168,8 @@ class PageEditor extends Component {
const currentTile = this.state.tile
const currentBox = this.state.box
const { res } = this.props.page.show
- const pageStyle = { backgroundColor: res.settings.background_color || '#000000' }
+ const { settings } = res
+ const pageStyle = { backgroundColor: settings ? settings.background_color : '#000000' }
return (
<div className='page' ref={this.pageRef} style={pageStyle}>
{res.tiles.map(tile => {