2021-10-29 16:11:06 +00:00
|
|
|
import { lazy } from "react";
|
2023-01-18 12:09:49 +00:00
|
|
|
import type { Path } from "react-router-dom";
|
|
|
|
import { generatePath } from "react-router-dom";
|
2023-03-27 14:10:48 +00:00
|
|
|
import type { AppRouteObject } from "../../routes";
|
2021-07-22 11:17:00 +00:00
|
|
|
|
|
|
|
export type ClientScopesParams = { realm: string };
|
|
|
|
|
2023-03-24 14:37:24 +00:00
|
|
|
const ClientScopesSection = lazy(() => import("../ClientScopesSection"));
|
|
|
|
|
2023-03-27 14:10:48 +00:00
|
|
|
export const ClientScopesRoute: AppRouteObject = {
|
2021-07-22 11:17:00 +00:00
|
|
|
path: "/:realm/client-scopes",
|
2023-03-24 14:37:24 +00:00
|
|
|
element: <ClientScopesSection />,
|
2023-09-13 14:05:17 +00:00
|
|
|
breadcrumb: (t) => t("clientScopeList"),
|
2023-03-27 00:31:23 +00:00
|
|
|
handle: {
|
|
|
|
access: "view-clients",
|
|
|
|
},
|
2021-07-22 11:17:00 +00:00
|
|
|
};
|
|
|
|
|
2022-08-19 18:05:09 +00:00
|
|
|
export const toClientScopes = (params: ClientScopesParams): Partial<Path> => ({
|
2021-07-22 11:17:00 +00:00
|
|
|
pathname: generatePath(ClientScopesRoute.path, params),
|
|
|
|
});
|