-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
49 lines (42 loc) · 1.38 KB
/
App.js
File metadata and controls
49 lines (42 loc) · 1.38 KB
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 { StatusBar } from "expo-status-bar";
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import { useFonts } from "expo-font";
// In App.js in a new project
import { NavigationContainer , DefaultTheme } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import HomeScreen from "./src/pages/home";
import DetailsScreen from "./src/pages/details";
const Stack = createNativeStackNavigator();
const theme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
background: "transparent",
},
};
export default function App() {
const [fontsLoaded] = useFonts({
InterBold: require("./src/assets/fonts/Inter-Bold.ttf"),
InterRegular: require("./src/assets/fonts/Inter-Regular.ttf"),
InterSemiBold: require("./src/assets/fonts/Inter-SemiBold.ttf"),
InterLight: require("./src/assets/fonts/Inter-Light.ttf"),
InterMedium: require("./src/assets/fonts/Inter-Medium.ttf"),
});
if (!fontsLoaded) {
return null;
}
return (
<NavigationContainer theme={theme}>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
initialRouteName="Home"
>
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="details" component={DetailsScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}