-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
64 lines (58 loc) · 1.82 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import 'react-native-gesture-handler';
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import useCachedResources from './hooks/useCachedResources';
import useColorScheme from './hooks/useColorScheme';
import Navigation from './navigation';
import { Provider as PaperProvider } from 'react-native-paper';
// Redux
import { Provider } from 'react-redux'
import { store } from './redux'
// Fonts
import {
useFonts,
CormorantGaramond_300Light,
CormorantGaramond_300Light_Italic,
CormorantGaramond_400Regular,
CormorantGaramond_400Regular_Italic,
CormorantGaramond_500Medium,
CormorantGaramond_500Medium_Italic,
CormorantGaramond_600SemiBold,
CormorantGaramond_600SemiBold_Italic,
CormorantGaramond_700Bold,
CormorantGaramond_700Bold_Italic
} from '@expo-google-fonts/cormorant-garamond'
import AppLoading from "expo-app-loading";
export default function App() {
const isLoadingComplete = useCachedResources();
const colorScheme = useColorScheme();
let [fontsLoaded, error] = useFonts({
CormorantGaramond_300Light,
CormorantGaramond_300Light_Italic,
CormorantGaramond_400Regular,
CormorantGaramond_400Regular_Italic,
CormorantGaramond_500Medium,
CormorantGaramond_500Medium_Italic,
CormorantGaramond_600SemiBold,
CormorantGaramond_600SemiBold_Italic,
CormorantGaramond_700Bold,
CormorantGaramond_700Bold_Italic
});
if (!isLoadingComplete) {
return null;
} else if (!fontsLoaded) {
return <AppLoading />;
} else {
return (
<SafeAreaProvider>
<Provider store={store}>
<PaperProvider>
<Navigation colorScheme={colorScheme} />
<StatusBar style="dark" />
</PaperProvider>
</Provider>
</SafeAreaProvider>
);
}
}