UNPKG

sanity

Version:

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches

22 lines (18 loc) 426 B
import {type i18n} from 'i18next' import {createContext} from 'react' import {type Locale} from './types' /** * @internal * @hidden */ export const LocaleContext = createContext<LocaleContextValue | undefined>(undefined) /** * @internal * @hidden */ export interface LocaleContextValue { locales: Locale[] currentLocale: Locale __internal: {i18next: i18n} changeLocale: (newLocale: string) => Promise<void> }