mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 11:36:25 +08:00
8ca3f2d53d
replace #14758 #### PR Dependency Tree * **PR #14760** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Enhanced language switching to ensure the settings dialog properly reflects language changes when users update their language preference. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
13 lines
351 B
TypeScript
13 lines
351 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, useTranslation } from 'react-i18next';
|