From 0000f96637ff3483d8da68f7f55dfd5977a64574 Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Fri, 19 Nov 2021 19:18:58 +0800 Subject: [PATCH] Remove the Styles link in Site Editor (#36637) --- packages/edit-site/src/components/editor/index.js | 15 +-------------- .../navigation-sidebar/navigation-panel/index.js | 7 ------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/packages/edit-site/src/components/editor/index.js b/packages/edit-site/src/components/editor/index.js index fad0b56a7f74b..c5218c8a2593c 100644 --- a/packages/edit-site/src/components/editor/index.js +++ b/packages/edit-site/src/components/editor/index.js @@ -104,7 +104,7 @@ function Editor( { initialSettings, onError } ) { const { setPage, setIsInserterOpened, updateSettings } = useDispatch( editSiteStore ); - const { enableComplementaryArea } = useDispatch( interfaceStore ); + useEffect( () => { updateSettings( initialSettings ); }, [] ); @@ -162,19 +162,6 @@ function Editor( { initialSettings, onError } ) { } }, [ isNavigationOpen ] ); - useEffect( - function openGlobalStylesOnLoad() { - const searchParams = new URLSearchParams( window.location.search ); - if ( searchParams.get( 'styles' ) === 'open' ) { - enableComplementaryArea( - 'core/edit-site', - 'edit-site/global-styles' - ); - } - }, - [ enableComplementaryArea ] - ); - // Don't render the Editor until the settings are set and loaded const isReady = settings?.siteUrl && diff --git a/packages/edit-site/src/components/navigation-sidebar/navigation-panel/index.js b/packages/edit-site/src/components/navigation-sidebar/navigation-panel/index.js index 704d8d1da8d88..2684fc9560d70 100644 --- a/packages/edit-site/src/components/navigation-sidebar/navigation-panel/index.js +++ b/packages/edit-site/src/components/navigation-sidebar/navigation-panel/index.js @@ -86,13 +86,6 @@ const NavigationPanel = ( { isOpen, setIsOpen, activeTemplateType } ) => { page: 'gutenberg-edit-site', } ) } /> -