-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
45 lines (41 loc) · 1.22 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
import React, { Fragment } from "react";
import {
SafeAreaProvider,
useSafeAreaInsets,
SafeAreaView,
} from "react-native-safe-area-context";
import { StatusBar } from "expo-status-bar";
import useCachedResources from "./src/hooks/useCachedResources";
import useColorScheme from "./src/hooks/useColorScheme";
import Navigation from "./src/navigation";
import { Provider } from "react-redux";
import store from "./src/store";
import {
setUpLocale,
setUpTranslation,
} from "./src/features/localization/translator";
import { View, Text } from "react-native";
// Set the key-value pairs for the different languages you want to support.
setUpTranslation();
// Set the locale once at the beginning of your app.
setUpLocale();
export default function App() {
const isLoadingComplete = useCachedResources();
const colorScheme = useColorScheme();
if (!isLoadingComplete) {
return (
<View style={{ flex: 1, alignContent: "center", alignItems: "center" }}>
<Text>...</Text>
</View>
);
} else {
return (
<Provider store={store}>
<SafeAreaProvider>
<StatusBar style="light" />
<Navigation colorScheme={colorScheme} />
</SafeAreaProvider>
</Provider>
);
}
}