diff --git a/packages/edit-site/src/components/editor/index.js b/packages/edit-site/src/components/editor/index.js index 250f1e1bfc146..53ad9fde4535e 100644 --- a/packages/edit-site/src/components/editor/index.js +++ b/packages/edit-site/src/components/editor/index.js @@ -28,7 +28,6 @@ import ErrorBoundary from '../error-boundary'; import WelcomeGuide from '../welcome-guide'; import { store as editSiteStore } from '../../store'; import { GlobalStylesRenderer } from './global-styles-renderer'; -import { GlobalStylesProvider } from '../global-styles/global-styles-provider'; import useTitle from '../routes/use-title'; import Layout from '../layout'; import EditorActions from './actions'; @@ -137,38 +136,34 @@ function Editor( { onError } ) { type={ templateType } id={ entityId } > - - - - - - - - { editorMode === 'visual' && template && ( - + + + + + + + { editorMode === 'visual' && template && ( + + ) } + { editorMode === 'text' && template && } + { templateResolved && + ! template && + settings?.siteUrl && + entityId && ( + + { __( + "You attempted to edit an item that doesn't exist. Perhaps it was deleted?" + ) } + ) } - { editorMode === 'text' && template && ( - - ) } - { templateResolved && - ! template && - settings?.siteUrl && - entityId && ( - - { __( - "You attempted to edit an item that doesn't exist. Perhaps it was deleted?" - ) } - - ) } - - - - + + + ); diff --git a/packages/edit-site/src/components/layout/index.js b/packages/edit-site/src/components/layout/index.js index 73da24e1bda5d..ccaedce296fc3 100644 --- a/packages/edit-site/src/components/layout/index.js +++ b/packages/edit-site/src/components/layout/index.js @@ -19,6 +19,7 @@ import { PluginArea } from '@wordpress/plugins'; * Internal dependencies */ import NavigationSidebar from '../navigation-sidebar'; +import { GlobalStylesProvider } from '../global-styles/global-styles-provider'; import { store as editSiteStore } from '../../store'; function Layout( { @@ -73,24 +74,26 @@ function Layout( { - - - } - notices={ } - shortcuts={ { - previous: previousShortcut, - next: nextShortcut, - } } - { ...props } - /> - - - { children } + + + + } + notices={ } + shortcuts={ { + previous: previousShortcut, + next: nextShortcut, + } } + { ...props } + /> + + + { children } +