blob: 488562f667ba0e7264263519156fac7bcf910783 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import { getAuth } from "../utils/auth"
const useAuth = () => {
const [auth, setAuth] = useState(null)
useEffect(() => {
const handleIsAuthenticated = () => setAuth(getAuth())
handleIsAuthenticated()
}, [])
return [auth, setAuth]
}
export default useAuth
|