Simplified toast function call

This commit is contained in:
Daniel Cojocea committed 2024-07-18 10:43:46 -04:00
1 parent 783d745181
commit 5150179193
8 files changed
+9 -61

No files matched your search

-6
View File
@@ -52,24 +52,18 @@ const ForgotPassword = () => {
sessionStorage.setItem("email", form.email);
navigate("/check-email");
createToast({
variant: "info",
body: `Instructions sent to ${form.email}.`,
hasIcon: false,
});
} else {
if (action.payload) {
// dispatch errors
createToast({
variant: "info",
body: action.payload.msg,
hasIcon: false,
});
} else {
// unknown errors
createToast({
variant: "info",
body: "Unknown error.",
hasIcon: false,
});
}
}