parent
02ffc1fb88
commit
5b23354e35
2 changed files with 8 additions and 5 deletions
|
@ -13,9 +13,9 @@ import { emptyFormatter, upperCaseFormatter } from "../util";
|
||||||
import { useRealm } from "../context/realm-context/RealmContext";
|
import { useRealm } from "../context/realm-context/RealmContext";
|
||||||
import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
|
import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
|
||||||
import { HelpItem } from "../components/help-enabler/HelpItem";
|
import { HelpItem } from "../components/help-enabler/HelpItem";
|
||||||
|
import { toRealmRole } from "./routes/RealmRole";
|
||||||
|
|
||||||
import "./RealmRolesSection.css";
|
import "./RealmRolesSection.css";
|
||||||
import { toRealmRole } from "./routes/RealmRole";
|
|
||||||
|
|
||||||
type myRealmRepresentation = RealmRepresentation & {
|
type myRealmRepresentation = RealmRepresentation & {
|
||||||
defaultRole?: {
|
defaultRole?: {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import type { LocationDescriptorObject } from "history";
|
import type { LocationDescriptorObject } from "history";
|
||||||
import { generatePath } from "react-router-dom";
|
import { useRouteMatch } from "react-router-dom";
|
||||||
import type { RouteDef } from "../../route-config";
|
import type { RouteDef } from "../../route-config";
|
||||||
import { RealmRoleTabs } from "../RealmRoleTabs";
|
import { RealmRoleTabs } from "../RealmRoleTabs";
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ export const RealmRoleRoute: RouteDef = {
|
||||||
|
|
||||||
export const toRealmRole = (
|
export const toRealmRole = (
|
||||||
params: RealmRoleParams
|
params: RealmRoleParams
|
||||||
): LocationDescriptorObject => ({
|
): LocationDescriptorObject => {
|
||||||
pathname: generatePath(RealmRoleRoute.path, params),
|
const { url } = useRouteMatch();
|
||||||
});
|
return {
|
||||||
|
pathname: `${url}/${params.id}/details`,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in a new issue