From eca357ef60dced408c5e57935e39778ad6df70bc Mon Sep 17 00:00:00 2001 From: Ramon Date: Wed, 4 Dec 2024 14:14:49 +1100 Subject: [PATCH] Site Editor: Fix the templates route on mobile (#67547) Co-authored-by: ramonjd Co-authored-by: tellthemachines --- .../site-editor-routes/templates.js | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/packages/edit-site/src/components/site-editor-routes/templates.js b/packages/edit-site/src/components/site-editor-routes/templates.js index 06ba07fcd06595..cb9f650bbf9267 100644 --- a/packages/edit-site/src/components/site-editor-routes/templates.js +++ b/packages/edit-site/src/components/site-editor-routes/templates.js @@ -1,29 +1,10 @@ -/** - * WordPress dependencies - */ -import { privateApis as routerPrivateApis } from '@wordpress/router'; - /** * Internal dependencies */ import Editor from '../editor'; import SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse'; -import { unlock } from '../../lock-unlock'; import PageTemplates from '../page-templates'; -const { useLocation } = unlock( routerPrivateApis ); - -function MobileTemplatesView() { - const { query = {} } = useLocation(); - const { canvas = 'view' } = query; - - return canvas === 'edit' ? ( - - ) : ( - - ); -} - export const templatesRoute = { name: 'templates', path: '/template', @@ -34,7 +15,7 @@ export const templatesRoute = { const isListView = query.layout === 'list'; return isListView ? : undefined; }, - mobile: , + mobile: , }, widths: { content( { query } ) {