From b4faecd11a55db1892b947032eea69dd64269b21 Mon Sep 17 00:00:00 2001 From: arthur791004 Date: Tue, 30 Apr 2024 18:47:19 +0800 Subject: [PATCH] Global Sidebar: Keep the Sites icon selected when GSV opens (#90085) --- client/my-sites/sidebar/body.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/my-sites/sidebar/body.jsx b/client/my-sites/sidebar/body.jsx index 73d6cfaef197c..e181c40280d58 100644 --- a/client/my-sites/sidebar/body.jsx +++ b/client/my-sites/sidebar/body.jsx @@ -32,7 +32,10 @@ export const MySitesSidebarUnifiedBody = ( { path, children, onMenuItemClick } ) <> { menuItems && menuItems.map( ( item, i ) => { - const isSelected = item?.url && itemLinkMatches( item.url, path ); + const isSelected = + ( item?.url && itemLinkMatches( item.url, path ) ) || + // Keep the Sites icon selected when there is a selected site. + ( item.slug === 'sites' && site ); if ( 'current-site' === item?.type ) { return (