keycloak-scim/src/clients/routes/ImportClient.ts

20 lines
622 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 ImportClientParams = { realm: string };
export const ImportClientRoute: RouteDef = {
path: "/:realm/clients/import-client",
2021-10-29 16:11:06 +00:00
component: lazy(() => import("../import/ImportForm")),
breadcrumb: (t) => t("clients:importClient"),
access: "manage-clients",
};
export const toImportClient = (
params: ImportClientParams
): LocationDescriptorObject => ({
pathname: generatePath(ImportClientRoute.path, params),
});