Files
shakespeare/src/hooks/useGitSyncState.ts
T

11 lines
297 B
TypeScript

import { useContext } from 'react';
import { GitSyncContext } from '@/contexts/GitSyncContext';
export function useGitSyncState() {
const context = useContext(GitSyncContext);
if (!context) {
throw new Error('useGitSyncState must be used within GitSyncProvider');
}
return context;
}