-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
85 lines (78 loc) · 1.78 KB
/
App.tsx
File metadata and controls
85 lines (78 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import i18next from 'i18next';
import React from 'react';
import { initReactI18next } from 'react-i18next';
import { configureFonts, DefaultTheme, Provider as PaperProvider } from 'react-native-paper';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { persistor, store } from './src/reducers/store';
import AppContainer from './src/router/AppContainer';
const languageDetector = {
type: 'languageDetector',
async: true,
detect: (cb: any) => cb('en'),
init: () => { },
cacheUserLanguage: () => { },
};
i18next
.use(languageDetector as any)
.use(initReactI18next)
.init({
fallbackLng: 'en',
debug: true,
resources: {
en: {
translation: require('./src/translations/en.json')
},
sv: {
translation: require('./src/translations/vi.json'),
},
},
});
const fontConfig = {
default: {
regular: {
fontFamily: 'sans-serif',
fontWeight: 'normal',
},
medium: {
fontFamily: 'sans-serif-medium',
fontWeight: 'normal',
},
light: {
fontFamily: 'sans-serif-light',
fontWeight: 'normal',
},
thin: {
fontFamily: 'sans-serif-thin',
fontWeight: 'normal',
},
},
};
const theme = {
...DefaultTheme,
fonts: configureFonts(fontConfig as any),
roundness: 2,
colors: {
...DefaultTheme.colors,
primary: '#6bcebb',
},
};
function App() {
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<PaperProvider theme={theme}>
<AppContainer />
</PaperProvider>
</PersistGate>
</Provider>
);
};
export default App;