chore: clean git cache
This commit is contained in:
10
frontend/src/hooks/useLanguage.ts
Normal file
10
frontend/src/hooks/useLanguage.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useContext } from 'react'
|
||||
import { LanguageContext, LanguageContextType } from '../context/LanguageContextValue'
|
||||
|
||||
export function useLanguage(): LanguageContextType {
|
||||
const context = useContext(LanguageContext)
|
||||
if (!context) {
|
||||
throw new Error('useLanguage must be used within a LanguageProvider')
|
||||
}
|
||||
return context
|
||||
}
|
||||
Reference in New Issue
Block a user