mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
14 lines
479 B
TypeScript
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;
|
|
} |