diff --git a/packages/edit-post/src/components/header/header-toolbar/index.js b/packages/edit-post/src/components/header/header-toolbar/index.js index de1dc9ffca493a..a7014f63eef3db 100644 --- a/packages/edit-post/src/components/header/header-toolbar/index.js +++ b/packages/edit-post/src/components/header/header-toolbar/index.js @@ -21,13 +21,7 @@ import { EditorHistoryRedo, EditorHistoryUndo, } from '@wordpress/editor'; -import { - Button, - DropdownMenu, - ToolbarItem, - MenuItemsChoice, - MenuGroup, -} from '@wordpress/components'; +import { Button, ToolbarItem } from '@wordpress/components'; import { plus } from '@wordpress/icons'; import { useRef } from '@wordpress/element'; @@ -47,7 +41,6 @@ function HeaderToolbar() { isTextModeEnabled, previewDeviceType, showIconLabels, - isNavigationTool, isTemplateMode, } = useSelect( ( select ) => { const { @@ -76,14 +69,11 @@ function HeaderToolbar() { showIconLabels: select( editPostStore ).isFeatureActive( 'showIconLabels' ), - isNavigationTool: select( blockEditorStore ).isNavigationMode(), isTemplateMode: select( editPostStore ).isEditingTemplate(), }; }, [] ); const isLargeViewport = useViewportMatch( 'medium' ); const isWideViewport = useViewportMatch( 'wide' ); - const isSmallViewport = useViewportMatch( 'small', '<' ); - const { setNavigationMode } = useDispatch( blockEditorStore ); const displayBlockToolbar = ! isLargeViewport || previewDeviceType !== 'Desktop' || hasFixedToolbar; @@ -94,10 +84,6 @@ function HeaderToolbar() { : /* translators: accessibility text for the editor toolbar when Top Toolbar is off */ __( 'Document tools' ); - const onSwitchMode = ( mode ) => { - setNavigationMode( mode === 'edit' ? false : true ); - }; - const overflowItems = ( <> ) } - { ! isWideViewport && ! isSmallViewport && showIconLabels && ( - - { () => ( - - - - - - - - - { overflowItems } - - ) } - - ) }