Skip to content

Commit d99ca97

Browse files
committed
fix: recreate t function when resolved language changes
1 parent 56f66bd commit d99ca97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/useTranslation/useTranslation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function useTranslation(namespace?: TranslationNamespace): TranslatorType
2828
changeLanguage: i18n.changeLanguage.bind(i18n),
2929
t
3030
};
31-
}, []);
31+
}, [resolvedLanguage]);
3232

3333
useEffect(() => {
3434
i18n.addEventListener('languageChange', setResolvedLanguage);

0 commit comments

Comments
 (0)