fix: #2131, doesn't log in unverified user after resetting password

This commit is contained in:
James
2023-02-19 22:06:39 -05:00
parent 7109bfde52
commit 3eb85b1554
4 changed files with 45 additions and 35 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react';
import { Link, useHistory, useParams } from 'react-router-dom';
import { toast } from 'react-toastify';
import { Trans, useTranslation } from 'react-i18next';
import { useConfig } from '../../utilities/Config';
import { useAuth } from '../../utilities/Auth';
@@ -29,6 +30,9 @@ const ResetPassword: React.FC = () => {
if (data.token) {
setToken(data.token);
history.push(`${admin}`);
} else {
history.push(`${admin}/login`);
toast.success(t('general:updatedSuccessfully'), { autoClose: 3000 });
}
};