Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* WordPress dependencies
*/
import { useRef, useEffect } from '@wordpress/element';
import {
__experimentalNavigation as Navigation,
__experimentalNavigationMenu as NavigationMenu,
Expand All @@ -19,14 +18,6 @@ import TemplatePartsMenu from './menus/template-parts';
import { MENU_ROOT, MENU_TEMPLATE_PARTS, MENU_TEMPLATES } from './constants';

export default function TemplatesNavigation() {
const ref = useRef();

useEffect( () => {
if ( ref.current ) {
ref.current.focus();
}
}, [ ref ] );

const { templateId, templatePartId, templateType, activeMenu } = useSelect(
( select ) => {
const {
Expand Down Expand Up @@ -63,7 +54,6 @@ export default function TemplatesNavigation() {
backButtonLabel={ __( 'Dashboard' ) }
className="edit-site-navigation-panel__back-to-dashboard"
href="index.php"
ref={ ref }
/>
) }

Expand Down