Skip to content

Commit

Permalink
backport for fixing redirect on cancelling role edit (#28601)
Browse files Browse the repository at this point in the history
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
  • Loading branch information
agagancarczyk and agancarc committed Apr 18, 2024
1 parent 60ea525 commit f911967
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/apps/admin-ui/src/client-scopes/details/MappingDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
import { Link, useMatch, useNavigate } from "react-router-dom";
import { KeycloakTextInput, TextControl } from "ui-shared";

import { adminClient } from "../../admin-client";
import { toClient } from "../../clients/routes/Client";
import { useAlerts } from "../../components/alert/Alerts";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
Expand All @@ -29,6 +27,7 @@ import { useFetch } from "../../utils/useFetch";
import { useParams } from "../../utils/useParams";
import { toClientScope } from "../routes/ClientScope";
import { MapperParams, MapperRoute } from "../routes/Mapper";
import { toDedicatedScope } from "../../clients/routes/DedicatedScopeDetails";

export default function MappingDetails() {
const { t } = useTranslation();
Expand All @@ -53,7 +52,7 @@ export default function MappingDetails() {
const toDetails = () =>
isOnClientScope
? toClientScope({ realm, id, tab: "mappers" })
: toClient({ realm, clientId: id, tab: "mappers" });
: toDedicatedScope({ realm, clientId: id, tab: "mappers" });

useFetch(
async () => {
Expand Down

0 comments on commit f911967

Please sign in to comment.