diff --git a/packages/editor/src/components/inserter-sidebar/index.js b/packages/editor/src/components/inserter-sidebar/index.js index 98292c6662559..0da3d7cada42c 100644 --- a/packages/editor/src/components/inserter-sidebar/index.js +++ b/packages/editor/src/components/inserter-sidebar/index.js @@ -5,10 +5,7 @@ import { useDispatch, useSelect } from '@wordpress/data'; import { Button } from '@wordpress/components'; import { __experimentalLibrary as Library } from '@wordpress/block-editor'; import { closeSmall } from '@wordpress/icons'; -import { - useViewportMatch, - __experimentalUseDialog as useDialog, -} from '@wordpress/compose'; +import { useViewportMatch } from '@wordpress/compose'; import { __ } from '@wordpress/i18n'; import { useRef } from '@wordpress/element'; import { store as preferencesStore } from '@wordpress/preferences'; @@ -34,19 +31,10 @@ export default function InserterSidebar( { const { setIsInserterOpened } = useDispatch( editorStore ); const isMobileViewport = useViewportMatch( 'medium', '<' ); - const [ inserterDialogRef, inserterDialogProps ] = useDialog( { - onClose: () => setIsInserterOpened( false ), - focusOnMount: true, - } ); - const libraryRef = useRef(); return ( -