keycloak-scim/apps/admin-ui/src/client-scopes/routes/ClientScopes.ts

18 lines
617 B
TypeScript
Raw Normal View History

2021-10-29 16:11:06 +00:00
import { lazy } from "react";
import type { Path } from "react-router-dom-v5-compat";
import { generatePath } from "react-router-dom-v5-compat";
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): Partial<Path> => ({
pathname: generatePath(ClientScopesRoute.path, params),
});