2022-02-21 12:14:20 +00:00
|
|
|
import type { LocationDescriptorObject } from "history";
|
|
|
|
import { lazy } from "react";
|
|
|
|
import { generatePath } from "react-router-dom";
|
|
|
|
import type { RouteDef } from "../../route-config";
|
|
|
|
|
|
|
|
export type DedicatedScopeTab = "mappers" | "scope";
|
|
|
|
|
|
|
|
export type DedicatedScopeDetailsParams = {
|
|
|
|
realm: string;
|
|
|
|
clientId: string;
|
|
|
|
tab?: DedicatedScopeTab;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const DedicatedScopeDetailsRoute: RouteDef = {
|
|
|
|
path: "/:realm/clients/:clientId/clientScopes/dedicated/:tab?",
|
|
|
|
component: lazy(() => import("../scopes/DedicatedScopes")),
|
|
|
|
breadcrumb: (t) => t("clients:dedicatedScopes"),
|
2022-05-30 09:23:24 +00:00
|
|
|
access: "view-clients",
|
2022-08-16 13:08:44 +00:00
|
|
|
legacy: true,
|
2022-02-21 12:14:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const toDedicatedScope = (
|
|
|
|
params: DedicatedScopeDetailsParams
|
|
|
|
): LocationDescriptorObject => ({
|
|
|
|
pathname: generatePath(DedicatedScopeDetailsRoute.path, params),
|
|
|
|
});
|