diff --git a/src/hooks/useAuth.ts b/src/hooks/useAuth.ts index 0479313fa68645acd8ff0ef33ff64e1b24e9ee6d..10236cbf18cda927dbb66cf436bcd65361f2b7ae 100644 --- a/src/hooks/useAuth.ts +++ b/src/hooks/useAuth.ts @@ -8,11 +8,11 @@ import { useEffect, useState } from 'react'; * @returns {boolean | null} isAuth: true if user is authenticated, false otherwise or null if the request has not finished. */ export const useAuth = (): [ - boolean, - React.Dispatch<React.SetStateAction<boolean>>, + boolean | null, + React.Dispatch<React.SetStateAction<boolean | null>>, ] => { let isMounted = true; - const [isAuth, setIsAuth] = useState<boolean>(false); + const [isAuth, setIsAuth] = useState<boolean | null>(null); useEffect(() => { isAuthenticated().then((state) => { if (isMounted) {