chore: lint
This commit is contained in:
@@ -43,10 +43,10 @@ const Login = () => {
|
|||||||
const submitForm = async (e: any) => {
|
const submitForm = async (e: any) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
if (!email.includes("@")) {
|
if (!email.includes("@")) {
|
||||||
notify("error", "Please enter a valid email.");
|
notify("error", "Please enter a valid email.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
@@ -61,11 +61,11 @@ if (!email.includes("@")) {
|
|||||||
navigate("/");
|
navigate("/");
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
const errorResponse = err.response?.data;
|
const errorResponse = err.response?.data;
|
||||||
|
|
||||||
const errorMessage = errorResponse?.code
|
const errorMessage = errorResponse?.code
|
||||||
? t(errorResponse.code)
|
? t(errorResponse.code)
|
||||||
: t('login.error.generic');
|
: t('login.error.generic');
|
||||||
|
|
||||||
notify("error", errorMessage);
|
notify("error", errorMessage);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user