-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
67 lines (60 loc) · 1.54 KB
/
App.js
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
import React from 'react';
import { View, StyleSheet } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import TabNavigator from './navigation/TabNavigator';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { useFonts } from 'expo-font';
import { LuckiestGuy_400Regular } from '@expo-google-fonts/luckiest-guy';
import {
Lato_100Thin,
Lato_100Thin_Italic,
Lato_300Light,
Lato_300Light_Italic,
Lato_400Regular,
Lato_700Bold,
Lato_700Bold_Italic,
Lato_900Black,
Lato_900Black_Italic,
} from '@expo-google-fonts/lato';
import * as SplashScreen from 'expo-splash-screen';
import { WatchlistProvider } from './context/WatchlistContext';
const queryClient = new QueryClient();
const App = () => {
const [loaded, error] = useFonts({
LuckiestGuy_400Regular,
Lato_100Thin,
Lato_100Thin_Italic,
Lato_300Light,
Lato_300Light_Italic,
Lato_400Regular,
Lato_700Bold,
Lato_700Bold_Italic,
Lato_900Black,
Lato_900Black_Italic,
});
React.useEffect(() => {
if (loaded) {
SplashScreen.hideAsync();
}
}, [loaded]);
if (!loaded) {
return null;
}
return (
<WatchlistProvider>
<QueryClientProvider client={queryClient}>
<View style={styles.container}>
<NavigationContainer>
<TabNavigator />
</NavigationContainer>
</View>
</QueryClientProvider>
</WatchlistProvider>
);
};
export default App;
const styles = StyleSheet.create({
container: {
flex: 1,
},
});