Skip to content

Commit

Permalink
Global Sidebar: Keep the Sites icon selected when GSV opens (#90085)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur791004 authored Apr 30, 2024
1 parent c693c41 commit b4faecd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/my-sites/sidebar/body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit b4faecd

Please sign in to comment.