keycloak-scim/js/apps/admin-ui/src/realm-settings/routes/AddClientProfile.tsx

24 lines
721 B
TypeScript

import { lazy } from "react";
import type { Path } from "react-router-dom";
import { generatePath } from "react-router-dom";
import type { RouteDef } from "../../route-config";
export type AddClientProfileParams = {
realm: string;
tab: string;
};
const ClientProfileForm = lazy(() => import("../ClientProfileForm"));
export const AddClientProfileRoute: RouteDef = {
path: "/:realm/realm-settings/client-policies/:tab/add-profile",
element: <ClientProfileForm />,
breadcrumb: (t) => t("realm-settings:newClientProfile"),
access: "manage-realm",
};
export const toAddClientProfile = (
params: AddClientProfileParams
): Partial<Path> => ({
pathname: generatePath(AddClientProfileRoute.path, params),
});