import { createContext, useContext } from "react"; import { AuthContextProps } from "./types"; const AuthContext = createContext(undefined); const useAuthContext = () => { const context = useContext(AuthContext); if (context === undefined) { throw new Error("useAuthContext must be used within an AuthProvider"); } return context; }; export { useAuthContext, AuthContext };