DockerRegistryWebUI/src/hooks/useAuth.tsx
2022-04-07 23:49:27 +01:00

15 lines
296 B
TypeScript

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