Abdullahrasheed45's picture
Create useVLMContext.ts
4464c3c verified
raw
history blame contribute delete
314 Bytes
import { useContext } from "react";
import { VLMContext } from "./VLMContext.ts";
import type { VLMContextValue } from "../types/vlm";
export function useVLMContext(): VLMContextValue {
const ctx = useContext(VLMContext);
if (!ctx) throw new Error("useVLMContext must be inside VLMProvider");
return ctx;
}