Ver código fonte

fixed inescapable login error

cdmoss 2 anos atrás
pai
commit
6b1aa61322
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/data/Auth/AuthContext.tsx

+ 2 - 2
src/data/Auth/AuthContext.tsx

@@ -333,12 +333,12 @@ export const AuthContextProvider: React.FC = ({children}) => {
             }
             else {
                 LOGGING.log('AUTH', 'error', "An error occured when trying to authenticate user: " + response.type)
-                setAlert({title: 'Login error', message: "Something went wrong while logging in. Please try again.", callback: () => {}, type: 'error'})
+                setAlert({title: 'Login error', message: "Something went wrong while logging in. Please try again.", callback: () => setAuthStateLoading(false), type: 'error'})
             }
         }
         catch (error) {
             LOGGING.log('AUTH', 'error', "An error occured when trying to authenticate user: " + error)
-            setAlert({title: 'Login error', message: "Something went wrong while logging in. Please try again.", callback: () => {}, type: 'error'})
+            setAlert({title: 'Login error', message: "Something went wrong while logging in. Please try again.", callback: () => setAuthStateLoading(false), type: 'error'})
         }
 
         return {success: false}