on registration failed msg

This commit is contained in:
AmitChauhan63390
2024-11-16 23:54:06 +05:30
parent 459daed60c
commit cf5c8b11e9

View File

@@ -43,8 +43,8 @@ const Register = () => {
notify("success", "Registration Successful!");
window.localStorage.setItem("user", JSON.stringify(data));
navigate("/");
} catch (err) {
notify("error", "Registration Failed. Please try again.");
} catch (error:any) {
notify("error", error.response.data || "Registration Failed. Please try again.");
setLoading(false);
}
};