fixed redirect on cancel (#28598)
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com> Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
This commit is contained in:
parent
cccddc0810
commit
adc8d388dc
1 changed files with 2 additions and 3 deletions
|
@ -15,9 +15,7 @@ import { FormProvider, useForm } from "react-hook-form";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link, useMatch, useNavigate } from "react-router-dom";
|
import { Link, useMatch, useNavigate } from "react-router-dom";
|
||||||
import { TextControl } from "ui-shared";
|
import { TextControl } from "ui-shared";
|
||||||
|
|
||||||
import { adminClient } from "../../admin-client";
|
import { adminClient } from "../../admin-client";
|
||||||
import { toClient } from "../../clients/routes/Client";
|
|
||||||
import { useAlerts } from "../../components/alert/Alerts";
|
import { useAlerts } from "../../components/alert/Alerts";
|
||||||
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
|
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
|
||||||
import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
|
import { DynamicComponents } from "../../components/dynamic/DynamicComponents";
|
||||||
|
@ -30,6 +28,7 @@ import { useFetch } from "../../utils/useFetch";
|
||||||
import { useParams } from "../../utils/useParams";
|
import { useParams } from "../../utils/useParams";
|
||||||
import { toClientScope } from "../routes/ClientScope";
|
import { toClientScope } from "../routes/ClientScope";
|
||||||
import { MapperParams, MapperRoute } from "../routes/Mapper";
|
import { MapperParams, MapperRoute } from "../routes/Mapper";
|
||||||
|
import { toDedicatedScope } from "../../clients/routes/DedicatedScopeDetails";
|
||||||
|
|
||||||
export default function MappingDetails() {
|
export default function MappingDetails() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
@ -54,7 +53,7 @@ export default function MappingDetails() {
|
||||||
const toDetails = () =>
|
const toDetails = () =>
|
||||||
isOnClientScope
|
isOnClientScope
|
||||||
? toClientScope({ realm, id, tab: "mappers" })
|
? toClientScope({ realm, id, tab: "mappers" })
|
||||||
: toClient({ realm, clientId: id, tab: "mappers" });
|
: toDedicatedScope({ realm, clientId: id, tab: "mappers" });
|
||||||
|
|
||||||
useFetch(
|
useFetch(
|
||||||
async () => {
|
async () => {
|
||||||
|
|
Loading…
Reference in a new issue