Skip to content

Commit

Permalink
Remove function from no longer function
Browse files Browse the repository at this point in the history
  • Loading branch information
RachelElysia committed Mar 21, 2024
1 parent 8f63492 commit d27cd88
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
58 changes: 28 additions & 30 deletions frontend/pages/admin/IntegrationsPage/IntegrationNavItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,32 @@ import Mdm from "./cards/MdmSettings/MdmSettings";
import AutomaticEnrollment from "./cards/AutomaticEnrollment/AutomaticEnrollment";
import Calendars from "./cards/Calendars/Calendars";

const getFilteredIntegrationSettingsNavItems = (): ISideNavItem<any>[] => {
return [
// TODO: types
{
title: "Ticket destinations",
urlSection: "ticket-destinations",
path: PATHS.ADMIN_INTEGRATIONS_TICKET_DESTINATIONS,
Card: Integrations,
},
{
title: "Mobile device management (MDM)",
urlSection: "mdm",
path: PATHS.ADMIN_INTEGRATIONS_MDM,
Card: Mdm,
},
{
title: "Automatic enrollment",
urlSection: "automatic-enrollment",
path: PATHS.ADMIN_INTEGRATIONS_AUTOMATIC_ENROLLMENT,
Card: AutomaticEnrollment,
},
{
title: "Calendars",
urlSection: "calendars",
path: PATHS.ADMIN_INTEGRATIONS_CALENDARS,
Card: Calendars,
},
];
};
const integrationSettingsNavItems: ISideNavItem<any>[] = [
// TODO: types
{
title: "Ticket destinations",
urlSection: "ticket-destinations",
path: PATHS.ADMIN_INTEGRATIONS_TICKET_DESTINATIONS,
Card: Integrations,
},
{
title: "Mobile device management (MDM)",
urlSection: "mdm",
path: PATHS.ADMIN_INTEGRATIONS_MDM,
Card: Mdm,
},
{
title: "Automatic enrollment",
urlSection: "automatic-enrollment",
path: PATHS.ADMIN_INTEGRATIONS_AUTOMATIC_ENROLLMENT,
Card: AutomaticEnrollment,
},
{
title: "Calendars",
urlSection: "calendars",
path: PATHS.ADMIN_INTEGRATIONS_CALENDARS,
Card: Calendars,
},
];

export default getFilteredIntegrationSettingsNavItems;
export default integrationSettingsNavItems;
4 changes: 2 additions & 2 deletions frontend/pages/admin/IntegrationsPage/IntegrationsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { InjectedRouter, Params } from "react-router/lib/Router";

import SideNav from "../components/SideNav";
import getFilteredIntegrationSettingsNavItems from "./IntegrationNavItems";
import integrationSettingsNavItems from "./IntegrationNavItems";

const baseClass = "integrations";

Expand All @@ -16,7 +16,7 @@ const IntegrationsPage = ({
params,
}: IIntegrationSettingsPageProps) => {
const { section } = params;
const navItems = getFilteredIntegrationSettingsNavItems();
const navItems = integrationSettingsNavItems;
const DEFAULT_SETTINGS_SECTION = navItems[0];
const currentSection =
navItems.find((item) => item.urlSection === section) ??
Expand Down

0 comments on commit d27cd88

Please sign in to comment.