diff --git a/src/block/select-dialog.js b/src/block/select-dialog.js index dc89016..4fa8222 100644 --- a/src/block/select-dialog.js +++ b/src/block/select-dialog.js @@ -5,41 +5,41 @@ import React from 'react'; import { Button, Modal, FocusableIframe } from '@wordpress/components'; class SelectDialog extends React.Component { - constructor(props) { - super(props); + constructor( props ) { + super( props ); - this.state = { - isOpen: false + this.state = { + isOpen: false, }; - }; + } componentDidMount() { - window.addEventListener('message', this.handlePostMessage, false); + window.addEventListener( 'message', this.handlePostMessage, false ); } componentWillUnmount() { - window.removeEventListener('message', this.handlePostMessage); + window.removeEventListener( 'message', this.handlePostMessage ); } - handlePostMessage = (event) => { - console.log('PostMessage recieved:', event.data); - this.props.onSelectForm(event.data); + handlePostMessage = ( event ) => { + console.log( 'PostMessage recieved:', event.data ); + this.props.onSelectForm( event.data ); } render() { return (