diff --git a/frontend/pages/SoftwarePage/SoftwarePage.tsx b/frontend/pages/SoftwarePage/SoftwarePage.tsx index ed148b3a99..5ae4946970 100644 --- a/frontend/pages/SoftwarePage/SoftwarePage.tsx +++ b/frontend/pages/SoftwarePage/SoftwarePage.tsx @@ -20,6 +20,7 @@ import teamsAPI, { ILoadTeamResponse } from "services/entities/teams"; import { AppContext } from "context/app"; import { NotificationContext } from "context/notification"; import useTeamIdParam from "hooks/useTeamIdParam"; +import { buildQueryStringFromParams } from "utilities/url"; import Button from "components/buttons/Button"; import MainContent from "components/MainContent"; @@ -256,7 +257,13 @@ const SoftwarePage = ({ children, router, location }: ISoftwarePageProps) => { const navigateToNav = useCallback( (i: number): void => { - const navPath = softwareSubNav[i].pathname.concat(location?.hash || ""); + // Only query param to persist between tabs is team id + const teamIdParam = buildQueryStringFromParams({ + team_id: location?.query.team_id, + }); + + const navPath = softwareSubNav[i].pathname.concat(`?${teamIdParam}`); + router.replace(navPath); }, [location, router]