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";
|
2021-07-22 11:17:00 +00:00
|
|
|
import type { RouteDef } from "../../route-config";
|
|
|
|
|
|
|
|
export type ClientScopesParams = { realm: string };
|
|
|
|
|
|
|
|
export const ClientScopesRoute: RouteDef = {
|
|
|
|
path: "/:realm/client-scopes",
|
2021-10-29 16:11:06 +00:00
|
|
|
component: lazy(() => import("../ClientScopesSection")),
|
2021-07-22 11:17:00 +00:00
|
|
|
breadcrumb: (t) => t("client-scopes:clientScopeList"),
|
|
|
|
access: "view-clients",
|
|
|
|
};
|
|
|
|
|
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),
|
|
|
|
});
|