mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
fix: auth pages errors handler
This commit is contained in:
@@ -32,13 +32,11 @@ export default function Login() {
|
||||
email: values.crediential,
|
||||
password: values.password,
|
||||
}).catch(({ response }) => {
|
||||
const {
|
||||
data: { errors },
|
||||
} = response;
|
||||
const toastBuilders = transformLoginErrorsToToasts(errors);
|
||||
const { data: error } = response;
|
||||
const toastMessages = transformLoginErrorsToToasts(error);
|
||||
|
||||
toastBuilders.forEach((builder) => {
|
||||
Toaster.show(builder);
|
||||
toastMessages.forEach((toastMessage) => {
|
||||
Toaster.show(toastMessage);
|
||||
});
|
||||
setSubmitting(false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user