navigate back to list when deleted (#20653)

fixes: #20370

Co-authored-by: Stian Thorgersen <stianst@gmail.com>
Co-authored-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Erik Jan de Wit
2023-06-01 10:52:21 +02:00
committed by GitHub
parent 6ea1aadbb3
commit c84fcbfff9

View File

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