ipa2korg / frontend /src /shared /auth /use-auth.ts
FUCAT
Update to v3.0.11 with HF deployment fixes
cdc337a
Raw
History Blame Contribute Delete
308 Bytes
import { useContext } from "react";
import { AuthContext, type AuthContextValue } from "@/shared/auth/auth-state";
export function useAuth(): AuthContextValue {
const value = useContext(AuthContext);
if (!value) {
throw new Error("useAuth must be used inside AuthProvider");
}
return value;
}