This repository has been archived on 2022-05-20. You can view files and clone it, but cannot push or open issues or pull requests.
Alley-HSBC-Frontend/src/hooks/useAuth.tsx

13 lines
252 B
TypeScript

import { useContext } from "react";
import AuthContext from "../context/AuthProvider";
interface loginInfo {
username: string;
isLoggedIn: boolean;
}
const useAuth = () => {
return useContext<loginInfo>(AuthContext);
};
export default useAuth;