Simplified toast function call
This commit is contained in:
1 parent
783d745181
commit
5150179193
8 files changed
+9
-61
No files matched your search
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user