From 86129b671df390d3e24ea1a02788bb0b80de7a3b Mon Sep 17 00:00:00 2001 From: Ramon Date: Wed, 4 Dec 2024 13:33:29 +1100 Subject: [PATCH] Site Editor Sidebar: remove `hasGlobalStyleVariations` condition for the Styles nav item (#67545) Co-authored-by: ramonjd Co-authored-by: tellthemachines --- .../index.js | 21 +------------------ .../sidebar-navigation-screen-main/index.js | 3 ++- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js index ad3a62e5cd5622..a5902dc37362c5 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js @@ -2,8 +2,7 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { useSelect, useDispatch } from '@wordpress/data'; -import { store as coreStore } from '@wordpress/core-data'; +import { useDispatch } from '@wordpress/data'; import { useCallback } from '@wordpress/element'; import { store as preferencesStore } from '@wordpress/preferences'; import { privateApis as routerPrivateApis } from '@wordpress/router'; @@ -24,27 +23,9 @@ const { useLocation, useHistory } = unlock( routerPrivateApis ); export function SidebarNavigationItemGlobalStyles( props ) { const { name } = useLocation(); - const hasGlobalStyleVariations = useSelect( - ( select ) => - !! select( - coreStore - ).__experimentalGetCurrentThemeGlobalStylesVariations()?.length, - [] - ); - if ( hasGlobalStyleVariations ) { - return ( - - ); - } return ( ); diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js index 1db651631c53d4..5cf162a8cd28cc 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js @@ -28,7 +28,8 @@ export function MainSidebarNavigationContent() { { __( 'Navigation' ) } { __( 'Styles' ) }