2021-10-29 16:11:06 +00:00
|
|
|
import { lazy } from "react";
|
2023-01-18 12:09:49 +00:00
|
|
|
import type { Path } from "react-router-dom";
|
|
|
|
import { generatePath } from "react-router-dom";
|
2021-07-21 15:08:40 +00:00
|
|
|
import type { RouteDef } from "../../route-config";
|
|
|
|
|
|
|
|
export type AddClientParams = { realm: string };
|
|
|
|
|
|
|
|
export const AddClientRoute: RouteDef = {
|
|
|
|
path: "/:realm/clients/add-client",
|
2021-10-29 16:11:06 +00:00
|
|
|
component: lazy(() => import("../add/NewClientForm")),
|
2021-07-21 15:08:40 +00:00
|
|
|
breadcrumb: (t) => t("clients:createClient"),
|
|
|
|
access: "manage-clients",
|
|
|
|
};
|
|
|
|
|
2022-08-19 18:05:09 +00:00
|
|
|
export const toAddClient = (params: AddClientParams): Partial<Path> => ({
|
2021-07-21 15:08:40 +00:00
|
|
|
pathname: generatePath(AddClientRoute.path, params),
|
|
|
|
});
|