Created
January 16, 2023 19:01
-
-
Save SahanAmarsha/750cc311fce59b0f8d82547e1b57d8ff to your computer and use it in GitHub Desktop.
useAuth hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useContext} from "react"; | |
import {AuthContext, IAuthContextType} from "../contexts/AuthContext"; | |
const useAuth = () => useContext(AuthContext) as IAuthContextType; | |
export default useAuth; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment