Skip to content

Commit

Permalink
EPMRPP-96153 || All Organizations option in the popover is always hig…
Browse files Browse the repository at this point in the history
…hlighted
  • Loading branch information
BlazarQSO committed Oct 21, 2024
1 parent c81dbad commit 2ab3f0d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { NavLink } from 'components/main/navLink';
import { COMMON_LOCALE_KEYS } from 'common/constants/localization';
import { SIDEBAR_EVENTS } from 'components/main/analytics/events';
import { useTracking } from 'react-tracking';
import { locationSelector } from 'controllers/pages/selectors';
import { OrganizationsItem } from './organizationsItem';
import styles from './organizationsPopover.scss';

Expand All @@ -57,6 +58,8 @@ export const OrganizationsPopover = ({ closePopover, closeSidebar }) => {
const [isSearchEventTriggered, setIsSearchEventTriggered] = useState(false);
const { trackEvent } = useTracking();
const maxHeightPopover = window.innerHeight - MARGIN_TOP_AND_MARGIN_BOTTOM;
const location = useSelector(locationSelector);
const isAllOrganizationPage = location.pathname === '/organizations';

const filteredProjects = useMemo(
() =>
Expand Down Expand Up @@ -126,7 +129,7 @@ export const OrganizationsPopover = ({ closePopover, closeSidebar }) => {
onClose();
trackEvent(SIDEBAR_EVENTS.CLICK_ALL_ORGANIZATION_PROJECTS);
}}
activeClassName={cx('active')}
activeClassName={cx({ active: isAllOrganizationPage })}
>
{formatMessage(messages.allOrganizations)}
</NavLink>
Expand Down

0 comments on commit 2ab3f0d

Please sign in to comment.