From 8ba422425e92fb3a2d4dc0ff3de0d8c07a705a0f Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Thu, 28 Jul 2022 11:55:56 +0200 Subject: [PATCH] SONAR-16683 [891475] global menu aria-current --- .../js/app/components/nav/global/GlobalNavMenu.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx index 866004c5051..ae72bfedf00 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx @@ -46,7 +46,10 @@ export class GlobalNavMenu extends React.PureComponent { return (
  • - + {translate('projects.page')}
  • @@ -64,17 +67,18 @@ export class GlobalNavMenu extends React.PureComponent { } renderIssuesLink() { - const active = this.props.location.pathname.startsWith('/issues'); - const search = (this.props.currentUser.isLoggedIn && isMySet() ? new URLSearchParams({ resolved: 'false', myIssues: 'true' }) : new URLSearchParams({ resolved: 'false' }) ).toString(); + return (
  • - + (isActive ? ACTIVE_CLASS_NAME : '')} + to={{ pathname: '/issues', search }}> {translate('issues.page')} - +
  • ); } -- 2.39.5