keycloak-scim/apps/admin-ui/src/clients/routes/Mapper.ts

22 lines
675 B
TypeScript
Raw Normal View History

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