|
1 | 1 | // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. |
2 | 2 | /* eslint-disable */ |
3 | 3 |
|
4 | | -import { useContext } from 'react'; |
5 | | -import type { I18nContextType } from 'typesafe-i18n/react'; |
6 | | -import { initI18nReact } from 'typesafe-i18n/react'; |
7 | | -import type { |
8 | | - Formatters, |
9 | | - Locales, |
10 | | - TranslationFunctions, |
11 | | - Translations, |
12 | | -} from './i18n-types'; |
13 | | -import { loadedFormatters, loadedLocales } from './i18n-util'; |
| 4 | +import { useContext } from 'react' |
| 5 | +import { initI18nReact } from 'typesafe-i18n/react' |
| 6 | +import type { I18nContextType } from 'typesafe-i18n/react' |
| 7 | +import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types' |
| 8 | +import { loadedFormatters, loadedLocales } from './i18n-util' |
14 | 9 |
|
15 | | -const { component: TypesafeI18n, context: I18nContext } = initI18nReact< |
16 | | - Locales, |
17 | | - Translations, |
18 | | - TranslationFunctions, |
19 | | - Formatters |
20 | | ->(loadedLocales, loadedFormatters); |
| 10 | +const { component: TypesafeI18n, context: I18nContext } = initI18nReact<Locales, Translations, TranslationFunctions, Formatters>(loadedLocales, loadedFormatters) |
21 | 11 |
|
22 | | -const useI18nContext = (): I18nContextType<Locales, Translations, TranslationFunctions> => |
23 | | - useContext(I18nContext); |
| 12 | +const useI18nContext = (): I18nContextType<Locales, Translations, TranslationFunctions> => useContext(I18nContext) |
24 | 13 |
|
25 | | -export { I18nContext, useI18nContext }; |
| 14 | +export { I18nContext, useI18nContext } |
26 | 15 |
|
27 | | -export default TypesafeI18n; |
| 16 | +export default TypesafeI18n |
0 commit comments