Add team id to sub-nav links on macOS settings page (#11005)

This commit is contained in:
gillespi314 2023-04-05 11:58:26 -05:00 committed by GitHub
parent 2f38f2e76a
commit af36687969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,15 +9,20 @@ import { API_NO_TEAM_ID, APP_CONTEXT_NO_TEAM_ID } from "interfaces/team";
import mdmAPI from "services/entities/mdm";
import MAC_OS_SETTINGS_NAV_ITEMS from "./MacOSSettingsNavItems";
import AggregateMacSettingsIndicators from "./AggregateMacSettingsIndicators/AggregateMacSettingsIndicators";
const baseClass = "mac-os-settings";
interface IMacOSSettingsProps {
params: Params;
location: {
search: string;
};
}
const MacOSSettings = ({ params }: IMacOSSettingsProps) => {
const MacOSSettings = ({
location: { search: queryString },
params,
}: IMacOSSettingsProps) => {
const { section } = params;
const { currentTeam } = useContext(AppContext);
@ -51,7 +56,10 @@ const MacOSSettings = ({ params }: IMacOSSettingsProps) => {
{profiles && <AggregateMacSettingsIndicators teamId={teamId} />}
<SideNav
className={`${baseClass}__side-nav`}
navItems={MAC_OS_SETTINGS_NAV_ITEMS}
navItems={MAC_OS_SETTINGS_NAV_ITEMS.map((navItem) => ({
...navItem,
path: navItem.path.concat(queryString),
}))}
activeItem={currentFormSection.urlSection}
CurrentCard={
<CurrentCard