2022-10-10 10:14:19 +00:00
|
|
|
import { lazy } from "react";
|
2023-01-18 12:09:49 +00:00
|
|
|
import type { IndexRouteObject, RouteObject } from "react-router-dom";
|
2022-10-10 10:14:19 +00:00
|
|
|
|
|
|
|
import { ErrorPage } from "./root/ErrorPage";
|
|
|
|
import { Root } from "./root/Root";
|
|
|
|
|
|
|
|
const DeviceActivity = lazy(() => import("./account-security/DeviceActivity"));
|
|
|
|
const LinkedAccounts = lazy(() => import("./account-security/LinkedAccounts"));
|
|
|
|
const SigningIn = lazy(() => import("./account-security/SigningIn"));
|
|
|
|
const Applications = lazy(() => import("./applications/Applications"));
|
|
|
|
const Groups = lazy(() => import("./groups/Groups"));
|
|
|
|
const PersonalInfo = lazy(() => import("./personal-info/PersonalInfo"));
|
|
|
|
const Resources = lazy(() => import("./resources/Resources"));
|
|
|
|
|
|
|
|
export const DeviceActivityRoute: RouteObject = {
|
|
|
|
path: "account-security/device-activity",
|
|
|
|
element: <DeviceActivity />,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const LinkedAccountsRoute: RouteObject = {
|
|
|
|
path: "account-security/linked-accounts",
|
|
|
|
element: <LinkedAccounts />,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const SigningInRoute: RouteObject = {
|
|
|
|
path: "account-security/signing-in",
|
|
|
|
element: <SigningIn />,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const ApplicationsRoute: RouteObject = {
|
|
|
|
path: "applications",
|
|
|
|
element: <Applications />,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const GroupsRoute: RouteObject = {
|
|
|
|
path: "groups",
|
|
|
|
element: <Groups />,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const ResourcesRoute: RouteObject = {
|
|
|
|
path: "resources",
|
|
|
|
element: <Resources />,
|
|
|
|
};
|
|
|
|
|
2023-06-12 12:10:26 +00:00
|
|
|
export const PersonalInfoRoute: IndexRouteObject = {
|
2022-10-10 10:14:19 +00:00
|
|
|
index: true,
|
2023-06-12 12:10:26 +00:00
|
|
|
element: <PersonalInfo />,
|
2022-10-10 10:14:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const RootRoute: RouteObject = {
|
|
|
|
path: "/",
|
|
|
|
element: <Root />,
|
|
|
|
errorElement: <ErrorPage />,
|
|
|
|
children: [
|
2023-06-12 12:10:26 +00:00
|
|
|
PersonalInfoRoute,
|
2022-10-10 10:14:19 +00:00
|
|
|
DeviceActivityRoute,
|
|
|
|
LinkedAccountsRoute,
|
|
|
|
SigningInRoute,
|
|
|
|
ApplicationsRoute,
|
|
|
|
GroupsRoute,
|
|
|
|
PersonalInfoRoute,
|
|
|
|
ResourcesRoute,
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
export const routes: RouteObject[] = [RootRoute];
|