mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
13 lines
335 B
TypeScript
13 lines
335 B
TypeScript
import { useMemo } from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
import { createI18nWrapper } from './i18next';
|
|
|
|
export const useI18n = () => {
|
|
const { i18n } = useTranslation('translation');
|
|
|
|
return useMemo(() => createI18nWrapper(() => i18n), [i18n]);
|
|
};
|
|
|
|
export { I18nextProvider, Trans } from 'react-i18next';
|