Files
md-files/.agents/skills/reveal-3d/code/reveal/hooks/useRevealContext.ts
T
2026-05-31 20:25:41 +00:00

14 lines
360 B
TypeScript

import { useContext } from 'react';
import {
RevealContext,
type RevealContextValue,
} from '../context/revealContext';
export function useRevealContext(): RevealContextValue {
const context = useContext(RevealContext);
if (context === undefined) {
throw new Error('useRevealContext must be used within a RevealProvider');
}
return context;
}