1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Change language working partially

Not all translatinos are updated
This commit is contained in:
Zhiyuan Zheng
2020-11-29 13:11:23 +01:00
parent 735cc0b903
commit 24d0681c9e
29 changed files with 525 additions and 125 deletions

14
App.tsx
View File

@ -5,7 +5,8 @@ import { Provider } from 'react-redux'
import ThemeManager from 'src/utils/styles/ThemeManager'
import { Index } from 'src/Index'
import { store } from 'src/store'
import { persistor, store } from 'src/store'
import { PersistGate } from 'redux-persist/integration/react'
const queryCache = new QueryCache()
@ -30,7 +31,16 @@ const App: React.FC = () => {
<ThemeManager>
<ReactQueryCacheProvider queryCache={queryCache}>
<Provider store={store}>
<Index />
<PersistGate persistor={persistor}>
{bootstrapped => {
if (bootstrapped) {
require('src/i18n/i18n')
return <Index />
} else {
return <></>
}
}}
</PersistGate>
</Provider>
</ReactQueryCacheProvider>
</ThemeManager>