2021-07-21 15:08:40 +00:00
|
|
|
import type { LocationDescriptorObject } from "history";
|
2021-10-29 16:11:06 +00:00
|
|
|
import { lazy } from "react";
|
2021-07-21 15:08:40 +00:00
|
|
|
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")),
|
2021-07-21 15:08:40 +00:00
|
|
|
breadcrumb: (t) => t("clients:importClient"),
|
|
|
|
access: "manage-clients",
|
|
|
|
};
|
|
|
|
|
|
|
|
export const toImportClient = (
|
|
|
|
params: ImportClientParams
|
|
|
|
): LocationDescriptorObject => ({
|
|
|
|
pathname: generatePath(ImportClientRoute.path, params),
|
|
|
|
});
|