Wait for group to be deleted before navigating (#1634)
This commit is contained in:
parent
72c34e0d46
commit
d7973a8008
1 changed files with 3 additions and 3 deletions
|
@ -48,7 +48,7 @@ export default function GroupsSection() {
|
|||
await adminClient.groups.del({
|
||||
id: group.id!,
|
||||
});
|
||||
addAlert(t("groupDelete"), AlertVariant.success);
|
||||
addAlert(t("groupDeleted", { count: 1 }), AlertVariant.success);
|
||||
} catch (error) {
|
||||
addError("groups:groupDeleteError", error);
|
||||
}
|
||||
|
@ -121,8 +121,8 @@ export default function GroupsSection() {
|
|||
<DropdownItem
|
||||
data-testid="deleteGroup"
|
||||
key="deleteGroup"
|
||||
onClick={() => {
|
||||
deleteGroup({ id });
|
||||
onClick={async () => {
|
||||
await deleteGroup({ id });
|
||||
history.push(toGroups({ realm }));
|
||||
}}
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue