Przeglądaj źródła

fixed inescapable login error

cdmoss 2 lat temu
rodzic
commit
6b1aa61322
1 zmienionych plików z 2 dodań i 2 usunięć
  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}