-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathApp.js
43 lines (37 loc) · 1.12 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
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { NavigationContainer } from "@react-navigation/native";
import { ContextProvider } from "./src/context/context";
import {
useFonts,
Poppins_300Light,
Poppins_300Light_Italic,
Poppins_400Regular,
Poppins_500Medium,
Poppins_700Bold,
} from "@expo-google-fonts/poppins";
import { Details, Favourites, Home } from "./src/screens";
const Stack = createNativeStackNavigator();
const App = () => {
let [fontsLoaded] = useFonts({
Poppins_300Light,
Poppins_300Light_Italic,
Poppins_400Regular,
Poppins_500Medium,
Poppins_700Bold,
});
if (!fontsLoaded) return null;
return (
<ContextProvider>
<NavigationContainer>
<Stack.Navigator
screenOptions={{ headerShown: false }}
initialRouteName="Home">
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Details" component={Details} />
<Stack.Screen name="Favourites" component={Favourites} />
</Stack.Navigator>
</NavigationContainer>
</ContextProvider>
);
};
export default App;