blob: af62e45c347bb83c3b147f1d1991ead4d7560cad (
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
|