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