Files
starter-e2e-mrf90kvm/apps/app/src/contexts/preferences.tsx
2026-07-10 20:07:50 +02:00

20 lines
476 B
TypeScript

import { createContext, useContext } from 'react'
export interface PreferencesContextValue {
locale: string
themeId: string
setLocale: (locale: string) => void
setThemeId: (themeId: string) => void
}
export const PreferencesContext = createContext<PreferencesContextValue>({
locale: 'en',
themeId: 'default',
setLocale: () => {},
setThemeId: () => {},
})
export function usePreferences(): PreferencesContextValue {
return useContext(PreferencesContext)
}