Skip to content

Commit

Permalink
fix: removed the initialization event check
Browse files Browse the repository at this point in the history
  • Loading branch information
likhith-deriv committed Jun 10, 2024
1 parent 3f5732d commit 65285cf
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/provider/translation-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@ export default function TranslationProvider({

useEffect(() => {
if (i18nInstance) {
console.log("Library: i18nInstance initialized.");
const initialLang = i18nInstance.language || defaultLang || "";
setCurrentLanguage(initialLang);
setIsTranslationsLoaded(true);
}
}, [i18nInstance, defaultLang]);

console.log("Library: ", {
i18nInstance,
isTranslationsLoaded,
});

if (!i18nInstance || !isTranslationsLoaded) return null;

return (
Expand Down

0 comments on commit 65285cf

Please sign in to comment.