fixed the fix (#3512)

This commit is contained in:
Erik Jan de Wit 2022-10-10 21:01:52 +02:00 committed by GitHub
parent 1a2c80600c
commit 73818dae64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 14 deletions

View file

@ -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,
];

View file

@ -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),