fixed the fix (#3512)
This commit is contained in:
parent
1a2c80600c
commit
73818dae64
2 changed files with 3 additions and 14 deletions
|
@ -1,8 +1,5 @@
|
|||
import type { RouteDef } from "../route-config";
|
||||
import {
|
||||
ClientScopeRoute,
|
||||
ClientScopeWithTypeRoute,
|
||||
} from "./routes/ClientScope";
|
||||
import { ClientScopeRoute } from "./routes/ClientScope";
|
||||
import { ClientScopesRoute } from "./routes/ClientScopes";
|
||||
import { MapperRoute } from "./routes/Mapper";
|
||||
import { NewClientScopeRoute } from "./routes/NewClientScope";
|
||||
|
@ -11,7 +8,6 @@ const routes: RouteDef[] = [
|
|||
NewClientScopeRoute,
|
||||
MapperRoute,
|
||||
ClientScopeRoute,
|
||||
ClientScopeWithTypeRoute,
|
||||
ClientScopesRoute,
|
||||
];
|
||||
|
||||
|
|
|
@ -13,21 +13,14 @@ export type ClientScopeParams = {
|
|||
};
|
||||
|
||||
export const ClientScopeRoute: RouteDef = {
|
||||
path: "/:realm/client-scopes/:id/:tab",
|
||||
path: "/:realm/client-scopes/:id/:tab/:type",
|
||||
component: lazy(() => import("../form/ClientScopeForm")),
|
||||
breadcrumb: (t) => t("client-scopes:clientScopeDetails"),
|
||||
access: "view-clients",
|
||||
};
|
||||
|
||||
export const ClientScopeWithTypeRoute: RouteDef = {
|
||||
...ClientScopeRoute,
|
||||
path: "/:realm/client-scopes/:id/:tab/:type",
|
||||
};
|
||||
|
||||
export const toClientScope = (params: ClientScopeParams): Partial<Path> => {
|
||||
const path = params.type
|
||||
? ClientScopeWithTypeRoute.path
|
||||
: ClientScopeRoute.path;
|
||||
const path = ClientScopeRoute.path;
|
||||
|
||||
return {
|
||||
pathname: generatePath(path, params),
|
||||
|
|
Loading…
Reference in a new issue