Skip to content

Commit 955307d

Browse files
authored
Merge pull request #73 from DouglasNeuroInformatics/recreate-t
fix: recreate t function when resolved language changes
2 parents 56f66bd + d99ca97 commit 955307d

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)