-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathApp.tsx
46 lines (39 loc) · 1.46 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
import * as React from "react";
import "react-native-gesture-handler";
import { StatusBar } from "expo-status-bar";
import { ThemeProvider } from "@shopify/restyle";
import { createStackNavigator } from "@react-navigation/stack";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { LoadAssets, theme } from "./src/components";
import { OnBoardingNavigator } from "./src/components/OnBoarding";
import { QuestionNavigator } from "./src/components/Question";
import { welcomeAssets } from "./src/components/OnBoarding/Welcome";
const assets: number[] = [welcomeAssets];
const fonts = {
"Gotham-Bold": require("./assets/fonts/Gotham-Bold.otf"),
"Gotham-Medium": require("./assets/fonts/GothamMedium.ttf"),
"Gotham-Black": require("./assets/fonts/Gotham-Black.otf"),
};
export type AppStackRoutes = {
OnBoarding: undefined;
Question: undefined;
};
const AppStack = createStackNavigator<AppStackRoutes>();
export default function App() {
return (
<ThemeProvider {...{ theme }}>
<LoadAssets {...{ assets, fonts }}>
<SafeAreaProvider>
<AppStack.Navigator headerMode="none" initialRouteName="OnBoarding">
<AppStack.Screen
name="OnBoarding"
component={OnBoardingNavigator}
/>
<AppStack.Screen name="Question" component={QuestionNavigator} />
</AppStack.Navigator>
</SafeAreaProvider>
</LoadAssets>
<StatusBar />
</ThemeProvider>
);
}