-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.tsx
More file actions
68 lines (62 loc) · 2.22 KB
/
App.tsx
File metadata and controls
68 lines (62 loc) · 2.22 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import {SafeAreaProvider} from "react-native-safe-area-context";
const Stack = createNativeStackNavigator();
import * as React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { useFonts } from "expo-font";
import Quiz from "./src/screens/Quiz";
import Result from "./src/screens/Result";
import SignUp from "./src/screens/SignUp";
import Home from "./src/screens/Home";
import Chat from "./src/screens/Chat";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
export default function App() {
const [hideSplashScreen] = React.useState(true);
const [fontsLoaded, error] = useFonts({
"Roboto-Medium": require("./assets/fonts/Roboto-Medium.ttf"),
"GothicA1-Light": require("./assets/fonts/GothicA1-Light.ttf"),
"GothicA1-Regular": require("./assets/fonts/GothicA1-Regular.ttf"),
"GothicA1-Bold": require("./assets/fonts/GothicA1-Bold.ttf"),
"GothicA1-ExtraBold": require("./assets/fonts/GothicA1-ExtraBold.ttf"),
"IBMPlexSans-Bold": require("./assets/fonts/IBMPlexSans-Bold.ttf"),
"NanumGothicExtraBold": require("./assets/fonts/NanumGothicExtraBold.ttf"),
"Nunito-Black": require("./assets/fonts/Nunito-Black.ttf"),
});
if (!fontsLoaded && !error) {
return null;
}
return (
<SafeAreaProvider>
<NavigationContainer>
{hideSplashScreen ? (
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen
name="Home"
component={Home}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Chat"
component={Chat}
options={{ headerShown: false }}
/>
<Stack.Screen
name="SignUp"
component={SignUp}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Quiz"
component={Quiz}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Result"
component={Result}
options={{ headerShown: false }}
/>
</Stack.Navigator>
) : null}
</NavigationContainer>
</SafeAreaProvider>
);
}