navigate back to list when deleted (#20591)

fixes: #20370
This commit is contained in:
Erik Jan de Wit 2023-05-30 14:21:37 +02:00 committed by GitHub
parent 1124681603
commit c187c17945
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,6 +44,7 @@ import {
toClientScope, toClientScope,
} from "./routes/ClientScope"; } from "./routes/ClientScope";
import { toMapper } from "./routes/Mapper"; import { toMapper } from "./routes/Mapper";
import { toClientScopes } from "./routes/ClientScopes";
export default function EditClientScope() { export default function EditClientScope() {
const { t } = useTranslation("client-scopes"); const { t } = useTranslation("client-scopes");
@ -137,6 +138,7 @@ export default function EditClientScope() {
try { try {
await adminClient.clientScopes.del({ id }); await adminClient.clientScopes.del({ id });
addAlert(t("deletedSuccess"), AlertVariant.success); addAlert(t("deletedSuccess"), AlertVariant.success);
navigate(toClientScopes({ realm }));
} catch (error) { } catch (error) {
addError("client-scopes:deleteError", error); addError("client-scopes:deleteError", error);
} }