We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
useEffect()
t()
1 parent f3ddbc3 commit 4cad4b9Copy full SHA for 4cad4b9
client/index.jsx
@@ -1,6 +1,6 @@
1
import React, { Suspense, useEffect } from 'react';
2
import { render } from 'react-dom';
3
-import { Provider } from 'react-redux';
+import { Provider, useSelector } from 'react-redux';
4
import { Router } from 'react-router-dom';
5
6
import { useTranslation } from 'react-i18next';
@@ -65,6 +65,7 @@ if (
65
66
const App = () => {
67
const { t } = useTranslation();
68
+ const language = useSelector((state) => state.preferences.language);
69
70
useEffect(() => {
71
setTimeout(() => {
@@ -80,7 +81,7 @@ const App = () => {
80
81
donateButton.prepend(donateLogoImage);
82
}
83
}, 500);
- }, [t]);
84
+ }, [language]);
85
86
return (
87
<div>
0 commit comments