diff --git a/packages/edit-site/src/components/navigation-inspector/index.js b/packages/edit-site/src/components/navigation-inspector/index.js index e109878f65466..7c3553743779c 100644 --- a/packages/edit-site/src/components/navigation-inspector/index.js +++ b/packages/edit-site/src/components/navigation-inspector/index.js @@ -3,14 +3,12 @@ */ import { useSelect } from '@wordpress/data'; import { useState, useEffect } from '@wordpress/element'; -import { SelectControl } from '@wordpress/components'; import { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data'; import { store as blockEditorStore, BlockEditorProvider, } from '@wordpress/block-editor'; import { speak } from '@wordpress/a11y'; -import { useInstanceId } from '@wordpress/compose'; import { __ } from '@wordpress/i18n'; /** @@ -71,11 +69,6 @@ export default function NavigationInspector( { onSelect } ) { }; }, [] ); - const navMenuListId = useInstanceId( - NavigationMenu, - 'edit-site-navigation-inspector-menu' - ); - const firstNavRefInTemplate = clientIdToRef[ firstNavigationBlockId ]; const firstNavigationMenuRef = navigationMenus?.[ 0 ]?.id; @@ -99,14 +92,6 @@ export default function NavigationInspector( { onSelect } ) { } }, [ selectedNavigationBlockId ] ); - let options = []; - if ( navigationMenus ) { - options = navigationMenus.map( ( { id, title } ) => ( { - value: id, - label: title.rendered, - } ) ); - } - const [ innerBlocks, onInput, onChange ] = useEntityBlockEditor( 'postType', 'wp_navigation', @@ -137,8 +122,6 @@ export default function NavigationInspector( { onSelect } ) { const isLoading = ! ( hasResolvedNavigationMenus && hasLoadedInnerBlocks ); - const hasMoreThanOneNavigationMenu = navigationMenus?.length > 1; - const hasNavigationMenus = !! navigationMenus?.length; // Entity block editor will return entities that are not currently published. @@ -178,21 +161,6 @@ export default function NavigationInspector( { onSelect } ) { { ! hasResolvedNavigationMenus && (
) } - { hasResolvedNavigationMenus && hasMoreThanOneNavigationMenu && ( - - setCurrentMenuId( Number( newMenuId ) ) - } - /> - ) } { isLoading && ( <>
diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menus/style.scss b/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menus/style.scss index 81196bac163ae..86a0c19534fbd 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menus/style.scss +++ b/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menus/style.scss @@ -1,8 +1,4 @@ .edit-site-sidebar-navigation-screen-navigation-menus { - .block-editor-list-view-block__menu-edit, - .edit-site-navigation-inspector__select-menu { - display: none; - } .offcanvas-editor-list-view-leaf { max-width: calc(100% - #{ $grid-unit-05 }); }