Skip to content

Commit

Permalink
removes redundant fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu committed Dec 3, 2019
1 parent 78285ab commit b3973a9
Showing 1 changed file with 36 additions and 38 deletions.
74 changes: 36 additions & 38 deletions packages/block-editor/src/components/media-replace-flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,44 +150,42 @@ const MediaReplaceFlow = (
onClose={ onClose }
className={ 'media-replace-flow__options' }
>
<>
<NavigableMenu>
<MenuItem
icon="admin-media"
onClick={ open }
>
{ __( 'Open Media Library' ) }
</MenuItem>
<MediaUploadCheck>
<FormFileUpload
onChange={ uploadFiles }
accept={ accept }
render={ ( { openFileDialog } ) => {
return (
<MenuItem
icon="upload"
onClick={ () => {
openFileDialog();
} }
>
{ __( 'Upload' ) }
</MenuItem>
);
} }
/>
</MediaUploadCheck>
<MenuItem
icon="admin-links"
onClick={ () => ( setShowURLInput( ! showURLInput ) ) }
aria-expanded={ showURLInput }
>
<div> { __( 'Insert from URL' ) } </div>
</MenuItem>
</NavigableMenu>
{ showURLInput && <div className="block-editor-media-flow__url-input">
{ urlInputUIContent }
</div> }
</>
<NavigableMenu>
<MenuItem
icon="admin-media"
onClick={ open }
>
{ __( 'Open Media Library' ) }
</MenuItem>
<MediaUploadCheck>
<FormFileUpload
onChange={ uploadFiles }
accept={ accept }
render={ ( { openFileDialog } ) => {
return (
<MenuItem
icon="upload"
onClick={ () => {
openFileDialog();
} }
>
{ __( 'Upload' ) }
</MenuItem>
);
} }
/>
</MediaUploadCheck>
<MenuItem
icon="admin-links"
onClick={ () => ( setShowURLInput( ! showURLInput ) ) }
aria-expanded={ showURLInput }
>
<div> { __( 'Insert from URL' ) } </div>
</MenuItem>
</NavigableMenu>
{ showURLInput && <div className="block-editor-media-flow__url-input">
{ urlInputUIContent }
</div> }
</Popover>
}
</Toolbar>
Expand Down

0 comments on commit b3973a9

Please sign in to comment.