From 25453c9c349f9c93f3d5fb9aa7ed8f681722a6fb Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 30 May 2023 16:42:57 +0400 Subject: [PATCH] Unlock component at the file level --- .../src/navigation/edit/menu-inspector-controls.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/block-library/src/navigation/edit/menu-inspector-controls.js b/packages/block-library/src/navigation/edit/menu-inspector-controls.js index 06ba6101d029f..cc8887a8785d9 100644 --- a/packages/block-library/src/navigation/edit/menu-inspector-controls.js +++ b/packages/block-library/src/navigation/edit/menu-inspector-controls.js @@ -32,6 +32,7 @@ const BLOCKS_WITH_LINK_UI_SUPPORT = [ 'core/navigation-link', 'core/navigation-submenu', ]; +const { PrivateListView } = unlock( blockEditorPrivateApis ); function AdditionalBlockContent( { block, insertedBlock, setInsertedBlock } ) { const { updateBlockAttributes } = useDispatch( blockEditorStore ); @@ -82,8 +83,6 @@ const MainContent = ( { isNavigationMenuMissing, onCreateNew, } ) => { - const { PrivateListView } = unlock( blockEditorPrivateApis ); - const hasChildren = useSelect( ( select ) => { return !! select( blockEditorStore ).getBlockCount( clientId );