Skip to content

Commit

Permalink
Remove the Styles link in Site Editor (#36637)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 authored and noisysocks committed Nov 22, 2021
1 parent b8686e8 commit e44b618
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
15 changes: 1 addition & 14 deletions packages/edit-site/src/components/editor/index.js
Expand Up @@ -104,7 +104,7 @@ function Editor( { initialSettings, onError } ) {
const { setPage, setIsInserterOpened, updateSettings } = useDispatch(
editSiteStore
);
const { enableComplementaryArea } = useDispatch( interfaceStore );

useEffect( () => {
updateSettings( initialSettings );
}, [] );
Expand Down Expand Up @@ -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 &&
Expand Down
Expand Up @@ -86,13 +86,6 @@ const NavigationPanel = ( { isOpen, setIsOpen, activeTemplateType } ) => {
page: 'gutenberg-edit-site',
} ) }
/>
<NavigationItem
title={ __( 'Styles' ) }
href={ addQueryArgs( '', {
page: 'gutenberg-edit-site',
styles: 'open',
} ) }
/>
<NavigationItem
title={ __( 'Templates' ) }
item="wp_template"
Expand Down

0 comments on commit e44b618

Please sign in to comment.