keycloak-scim/src/client-scopes/routes/ClientScopes.ts

20 lines
623 B
TypeScript
Raw Normal View History

import type { LocationDescriptorObject } from "history";
2021-10-29 16:11:06 +00:00
import { lazy } from "react";
import { generatePath } from "react-router-dom";
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")),
breadcrumb: (t) => t("client-scopes:clientScopeList"),
access: "view-clients",
};
export const toClientScopes = (
params: ClientScopesParams
): LocationDescriptorObject => ({
pathname: generatePath(ClientScopesRoute.path, params),
});