Skip to content

Commit

Permalink
Fix modal not opened when making template part
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Nov 18, 2021
1 parent 300edf7 commit 1996ad5
Showing 1 changed file with 13 additions and 13 deletions.
Expand Up @@ -53,9 +53,9 @@ export default function ConvertToTemplatePart( { clientIds, blocks } ) {
};

return (
<BlockSettingsMenuControls>
{ ( { onClose } ) => (
<>
<>
<BlockSettingsMenuControls>
{ ( { onClose } ) => (
<MenuItem
onClick={ () => {
setIsModalOpen( true );
Expand All @@ -64,16 +64,16 @@ export default function ConvertToTemplatePart( { clientIds, blocks } ) {
>
{ __( 'Make template part' ) }
</MenuItem>
{ isModalOpen && (
<CreateTemplatePartModal
closeModal={ () => {
setIsModalOpen( false );
} }
onCreate={ onConvert }
/>
) }
</>
) }
</BlockSettingsMenuControls>
{ isModalOpen && (
<CreateTemplatePartModal
closeModal={ () => {
setIsModalOpen( false );
} }
onCreate={ onConvert }
/>
) }
</BlockSettingsMenuControls>
</>
);
}

0 comments on commit 1996ad5

Please sign in to comment.