Files
shakespeare/src/hooks/useGitSettings.ts
T
2025-09-13 12:01:46 -05:00

14 lines
479 B
TypeScript

import { useContext } from 'react';
import { GitSettingsContext, type GitSettingsContextType } from '@/contexts/GitSettingsContext';
/**
* Hook to access and update Git settings
* @returns Git settings context with settings and update methods
*/
export function useGitSettings(): GitSettingsContextType {
const context = useContext(GitSettingsContext);
if (!context) {
throw new Error('useGitSettings must be used within GitSettingsProvider');
}
return context;
}