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

@@ -79,9 +79,7 @@ const PasswordPanel = () => {
const action = await dispatch(update({ authToken, localData }));
if (action.payload.success) {
createToast({
variant: "info",
body: "Your password was changed successfully.",
hasIcon: false,
});
setLocalData({
password: "",
@@ -91,9 +89,7 @@ const PasswordPanel = () => {
} else {
// TODO: Check for other errors?
createToast({
variant: "info",
body: "Your password input was incorrect.",
hasIcon: false,
});
setErrors({ password: "*" + action.payload.msg + "." });
}