register: Fix a few warnings linter issues

This commit is contained in:
nikolark committed 2024-07-04 09:20:51 +02:00
1 parent 731afa71e1
commit 1e1091b1e1
1 file changed
+3 -3
+3 -3
View File
@@ -12,7 +12,7 @@ const useUserRegister = () => {
const navigation = useNavigation();
const isAuthenticated = useSelector((store) => store.isAuthenticated);
const isRegisteringUser = useSelector((store) => store.isRegisteringUser);
const registerError = useSelector((store) => (store.registerError === null ? {} : store.registerError));
const registerError = useSelector((store) => store.registerError) || {};
const isAuthenticatedPrev = usePrevious(isAuthenticated);
@@ -37,9 +37,9 @@ const useUserRegister = () => {
dispatch(requestRegisterUser(values));
// Display error messages from API on form fields
for (const key in registerError) {
Object.keys(registerError).forEach((key) => {
setError(key, { type: 'manual', message: registerError[key] });
}
});
});
useEffect(() => {