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 type { RouteDef } from "../route-config";
|
||||||
import {
|
import { ClientScopeRoute } from "./routes/ClientScope";
|
||||||
ClientScopeRoute,
|
|
||||||
ClientScopeWithTypeRoute,
|
|
||||||
} from "./routes/ClientScope";
|
|
||||||
import { ClientScopesRoute } from "./routes/ClientScopes";
|
import { ClientScopesRoute } from "./routes/ClientScopes";
|
||||||
import { MapperRoute } from "./routes/Mapper";
|
import { MapperRoute } from "./routes/Mapper";
|
||||||
import { NewClientScopeRoute } from "./routes/NewClientScope";
|
import { NewClientScopeRoute } from "./routes/NewClientScope";
|
||||||
|
@ -11,7 +8,6 @@ const routes: RouteDef[] = [
|
||||||
NewClientScopeRoute,
|
NewClientScopeRoute,
|
||||||
MapperRoute,
|
MapperRoute,
|
||||||
ClientScopeRoute,
|
ClientScopeRoute,
|
||||||
ClientScopeWithTypeRoute,
|
|
||||||
ClientScopesRoute,
|
ClientScopesRoute,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -13,21 +13,14 @@ export type ClientScopeParams = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ClientScopeRoute: RouteDef = {
|
export const ClientScopeRoute: RouteDef = {
|
||||||
path: "/:realm/client-scopes/:id/:tab",
|
path: "/:realm/client-scopes/:id/:tab/:type",
|
||||||
component: lazy(() => import("../form/ClientScopeForm")),
|
component: lazy(() => import("../form/ClientScopeForm")),
|
||||||
breadcrumb: (t) => t("client-scopes:clientScopeDetails"),
|
breadcrumb: (t) => t("client-scopes:clientScopeDetails"),
|
||||||
access: "view-clients",
|
access: "view-clients",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ClientScopeWithTypeRoute: RouteDef = {
|
|
||||||
...ClientScopeRoute,
|
|
||||||
path: "/:realm/client-scopes/:id/:tab/:type",
|
|
||||||
};
|
|
||||||
|
|
||||||
export const toClientScope = (params: ClientScopeParams): Partial<Path> => {
|
export const toClientScope = (params: ClientScopeParams): Partial<Path> => {
|
||||||
const path = params.type
|
const path = ClientScopeRoute.path;
|
||||||
? ClientScopeWithTypeRoute.path
|
|
||||||
: ClientScopeRoute.path;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
pathname: generatePath(path, params),
|
pathname: generatePath(path, params),
|
||||||
|
|
Loading…
Reference in a new issue