From 037fe88a3d5a94a6a44cb5b461254ef612ad5d8c Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 23 Dec 2021 21:41:43 +0000 Subject: [PATCH] Formatting fixes --- src/block/select-dialog.js | 42 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) 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 (
- - { this.state.isOpen && ( - this.setState({isOpen: false}) } shouldCloseOnClickOutside={ false }> - - - ) } + + { this.state.isOpen && ( + this.setState( { isOpen: false } ) } shouldCloseOnClickOutside={ false }> + + + ) }
); - }; -}; + } +} -export default SelectDialog +export default SelectDialog;