Refactored register page validation

This commit is contained in:
Daniel Cojocea committed 2024-07-15 18:47:23 -04:00
1 parent 5fbf5caec4
commit 54a10740be
4 files changed
+108 -77

No files matched your search

@@ -204,6 +204,22 @@ const ProfilePanel = () => {
if (action.payload.success) {
dispatch(clearAuthState());
dispatch(clearMonitorState());
} 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,
});
}
}
};