Remove duplicate success message (#39938)

Closes #39937

Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>
This commit is contained in:
Alexander Schwartz 2025-05-26 14:07:34 +02:00 committed by GitHub
parent e3b3a0d217
commit d56e561620
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,12 +45,7 @@ export const ExtendedHeader = ({
messageKey: t("removeImportedUsersMessage"),
continueButtonLabel: "remove",
onConfirm: async () => {
try {
removeImportedUsers();
addAlert(t("removeImportedUsersSuccess"), AlertVariant.success);
} catch (error) {
addError("removeImportedUsersError", error);
}
await removeImportedUsers();
},
});
@ -58,8 +53,8 @@ export const ExtendedHeader = ({
try {
if (id) {
await adminClient.userStorageProvider.removeImportedUsers({ id });
addAlert(t("removeImportedUsersSuccess"), AlertVariant.success);
}
addAlert(t("removeImportedUsersSuccess"), AlertVariant.success);
} catch (error) {
addError("removeImportedUsersError", error);
}