diff --git a/public/styles.css b/public/styles.css index 36852f7..88a633a 100644 --- a/public/styles.css +++ b/public/styles.css @@ -120,5 +120,4 @@ body { .block-entry { border: 1px solid #ddd; - cursor: pointer; } diff --git a/src/containers/App.js b/src/containers/App.js index 4a42ee7..a755190 100644 --- a/src/containers/App.js +++ b/src/containers/App.js @@ -20,6 +20,19 @@ class App extends React.Component { this.handleChangeActiveTab = this.handleChangeActiveTab.bind(this); this.handleChangePreviewMode = this.handleChangePreviewMode.bind(this); this.handlePushBlock = this.handlePushBlock.bind(this); + this.handleMessage = this.handleMessage.bind(this); + } + + componentDidMount() { + window.addEventListener("message", this.handleMessage) + } + + componentWillUnmount() { + window.removeEventListener("message", this.handleMessage) + } + + handleMessage(event) { + console.log(event.data) } handleChangeActiveTab(index) { diff --git a/src/containers/BlocksGallery.js b/src/containers/BlocksGallery.js index 9e225f5..fd6f5e8 100644 --- a/src/containers/BlocksGallery.js +++ b/src/containers/BlocksGallery.js @@ -9,10 +9,9 @@ class BlocksGallery extends Component { {Object.keys(blocks).map(blockId => { const block = blocks[blockId]; if (block.category === this.props.category) { - return