feat: add LocaleProvider and hooks for managing locale and timezone settings
Some checks failed
Frontend CI / lint (push) Failing after 19s
Frontend CI / build (push) Has been skipped

This commit is contained in:
JSC
2025-08-15 19:19:05 +02:00
parent 32140d7b5a
commit cd654b8777
6 changed files with 182 additions and 9 deletions

11
src/hooks/use-locale.ts Normal file
View File

@@ -0,0 +1,11 @@
import { LocaleProviderContext } from '@/contexts/LocaleContext'
import { useContext } from 'react'
export const useLocale = () => {
const context = useContext(LocaleProviderContext)
if (context === undefined)
throw new Error('useLocale must be used within a LocaleProvider')
return context
}