import { useContext } from "react";
import { AuthContext } from "@/context/AuthContext";

export const AUTH_FLAG = "vontor_was_logged_in";

export function useAuth() {
  const ctx = useContext(AuthContext);
  if (!ctx) throw new Error("useAuth must be used inside AuthProvider");
  return ctx;
}
