DocDoeAI / src /lib /auth /useAuth.ts
asnannp's picture
deploy: sync backend to Space root (learn-lesson HF cache fix)
65d68f5
Raw History Blame Contribute Delete
294 Bytes
"use client";
import { useContext } from "react";
import { AuthContext } from "@/lib/auth/AuthProvider";
export function useAuth() {
const context = useContext(AuthContext);
if (context === null) {
throw new Error("useAuth must be used inside AuthProvider.");
}
return context;
}