keycloak-scim/src/realm-settings/routes/RsaSettings.ts

24 lines
705 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";
import { EditProviderCrumb } from "../RealmSettingsSection";
export type RsaSettingsParams = {
realm: string;
id: string;
};
export const RsaSettingsRoute: RouteDef = {
path: "/:realm/realm-settings/keys/:id/rsa/settings",
2021-10-29 16:11:06 +00:00
component: lazy(() => import("../key-providers/rsa/RSAForm")),
breadcrumb: () => EditProviderCrumb,
access: "view-realm",
};
export const toRsaSettings = (
params: RsaSettingsParams
): LocationDescriptorObject => ({
pathname: generatePath(RsaSettingsRoute.path, params),
});