Client: ResetApplicationDialog: add success toast

This commit is contained in:
Viktor Fomin 2023-03-03 14:01:10 +03:00
parent c6e1c58e97
commit 4d60816027

View File

@ -14,10 +14,11 @@ class ResetApplicationDialogComponent extends React.Component {
}
resetApp = async () => {
const { resetTfaApp, id, onClose, history } = this.props;
const { t, resetTfaApp, id, onClose, history } = this.props;
onClose && onClose();
try {
const res = await resetTfaApp(id);
toastr.success(t("SuccessResetApplication"));
if (res) history.push(res.replace(window.location.origin, ""));
} catch (e) {
toastr.error(e);