From a6d5028db6c82e60b7d1cb863aa20d31e18471c9 Mon Sep 17 00:00:00 2001 From: ramon Date: Wed, 4 Dec 2024 13:09:34 +1100 Subject: [PATCH] Revert the changes to packages/edit-site/src/components/site-editor-routes/templates.js as they're taken care of in https://github.com/WordPress/gutenberg/pull/67547 --- .../site-editor-routes/templates.js | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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 cb9f650bbf9267..06ba07fcd06595 100644 --- a/packages/edit-site/src/components/site-editor-routes/templates.js +++ b/packages/edit-site/src/components/site-editor-routes/templates.js @@ -1,10 +1,29 @@ +/** + * 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', @@ -15,7 +34,7 @@ export const templatesRoute = { const isListView = query.layout === 'list'; return isListView ? : undefined; }, - mobile: , + mobile: , }, widths: { content( { query } ) {