2021-10-29 16:11:06 +00:00
|
|
|
import { lazy } from "react";
|
2022-08-19 18:05:09 +00:00
|
|
|
import type { Path } from "react-router-dom-v5-compat";
|
|
|
|
import { generatePath } from "react-router-dom-v5-compat";
|
|
|
|
import type { RouteDef } from "../../route-config";
|
2021-10-20 14:26:05 +00:00
|
|
|
|
|
|
|
export type MapperParams = {
|
|
|
|
realm: string;
|
|
|
|
id: string;
|
|
|
|
mapperId: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const MapperRoute: RouteDef = {
|
2022-02-21 12:14:20 +00:00
|
|
|
path: "/:realm/clients/:id/clientScopes/dedicated/mappers/:mapperId",
|
2021-10-29 16:11:06 +00:00
|
|
|
component: lazy(() => import("../../client-scopes/details/MappingDetails")),
|
2021-10-20 14:26:05 +00:00
|
|
|
breadcrumb: (t) => t("common:mappingDetails"),
|
|
|
|
access: "view-clients",
|
|
|
|
};
|
|
|
|
|
2022-08-19 18:05:09 +00:00
|
|
|
export const toMapper = (params: MapperParams): Partial<Path> => ({
|
2021-10-20 14:26:05 +00:00
|
|
|
pathname: generatePath(MapperRoute.path, params),
|
|
|
|
});
|