-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
49 lines (44 loc) · 1.25 KB
/
App.tsx
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
import AppLoading from 'expo-app-loading';
import {
useFonts,
Poppins_400Regular,
Poppins_400Regular_Italic,
Poppins_500Medium,
Poppins_500Medium_Italic,
Poppins_700Bold,
Poppins_700Bold_Italic,
} from '@expo-google-fonts/poppins';
import * as Localization from 'expo-localization';
import i18n from 'i18n-js';
import AppContainer from './src/components/Containers';
import en from './src/hooks/i18n/locales/en-US';
import pt from './src/hooks/i18n/locales/pt-BR';
import { AuthRoutes } from './src/routes/auth.routes';
// Set the key-value pairs for the different languages you want to support.
i18n.translations = {
en: en,
pt: pt,
};
// Set the locale once at the beginning of your app.
i18n.locale = Localization.locale;
// When a value is missing from a language it'll fallback to another language with the key present.
i18n.fallbacks = true;
export default function App() {
let [fontsLoaded] = useFonts({
Poppins_400Regular,
Poppins_400Regular_Italic,
Poppins_500Medium,
Poppins_500Medium_Italic,
Poppins_700Bold,
Poppins_700Bold_Italic,
PomotaskIcon: require('./assets/icons/icomoon.ttf')
});
if(!fontsLoaded) {
return <AppLoading />
}
return (
<AppContainer>
<AuthRoutes />
</AppContainer>
);
}