mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
Fix controls page tab navigation (#10125)
This commit is contained in:
parent
728c47fa34
commit
8c4d4b1763
@ -54,9 +54,12 @@ const ManageControlsPage = ({
|
||||
location,
|
||||
router,
|
||||
}: IManageControlsPageProps): JSX.Element => {
|
||||
const { availableTeams, isPremiumTier, setCurrentTeam } = useContext(
|
||||
AppContext
|
||||
);
|
||||
const {
|
||||
availableTeams,
|
||||
isPremiumTier,
|
||||
currentTeam,
|
||||
setCurrentTeam,
|
||||
} = useContext(AppContext);
|
||||
|
||||
const { data: mdmApple, isLoading: isLoadingMdmApple } = useQuery<
|
||||
IMdmApple,
|
||||
@ -69,7 +72,9 @@ const ManageControlsPage = ({
|
||||
|
||||
const navigateToNav = (i: number): void => {
|
||||
const navPath = controlsSubNav[i].pathname;
|
||||
router.push(navPath);
|
||||
const teamId = currentTeam?.id || undefined;
|
||||
const queryString = teamId === undefined ? "" : `?team_id=${teamId}`;
|
||||
router.replace(navPath + queryString);
|
||||
};
|
||||
|
||||
const handleTeamSelect = (ctx: ITeamsDropdownState) => {
|
||||
|
Loading…
Reference in New Issue
Block a user