first commit
This commit is contained in:
10
src/i18n/context.ts
Normal file
10
src/i18n/context.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { createContext } from 'react'
|
||||
import type { Locale } from './translations'
|
||||
|
||||
export type I18nContextValue = {
|
||||
locale: Locale
|
||||
setLocale: (locale: Locale) => void
|
||||
t: (key: string) => string
|
||||
}
|
||||
|
||||
export const I18nContext = createContext<I18nContextValue | null>(null)
|
||||
Reference in New Issue
Block a user