-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
88 lines (75 loc) · 2.34 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import 'react-native-gesture-handler';
import React from "react"
import { KeyboardAvoidingView, StyleSheet, Text, View } from "react-native"
import { ThemeProvider } from "@shopify/restyle"
import { SafeAreaProvider } from "react-native-safe-area-context"
import { HomeNavigator } from './src/Home'
import { LoadAssets, theme } from "./src/components"
import { StatusBar } from "react-native"
import { createStackNavigator } from "@react-navigation/stack"
import { Routes } from "./src/components/Routes"
import {
Welcome,
Onboarding,
Login,
Signup,
ForgetPassword,
assets as authenticationAssets,
} from "./src/Authentication"
import PasswordChange from "./src/Authentication/components/PasswordChange"
const fonts = {
Bold: require("./assets/fonts/SFPro-Display-Bold.ttf"),
SemiBold: require("./assets/fonts/SFPro-Display-Semibold.ttf"),
Medium: require("./assets/fonts/SFPro-Display-Medium.ttf"),
Regular: require("./assets/fonts/SFPro-Display-Regular.ttf"),
}
const assets = [...authenticationAssets]
const AuthencationStack = createStackNavigator<Routes>()
type AppStackRoutes = {
Authentication: undefined;
Home: undefined
};
const AppStack = createStackNavigator<AppStackRoutes>();
const AuthencationNavigator = () => {
return (
<AuthencationStack.Navigator headerMode={"none"}>
<AuthencationStack.Screen
name={"Onboarding"}
component={Onboarding}
/>
<AuthencationStack.Screen name={"Welcome"} component={Welcome} />
<AuthencationStack.Screen name={"Login"} component={Login} />
<AuthencationStack.Screen name={"Signup"} component={Signup} />
<AuthencationStack.Screen
name={"ForgetPassword"}
component={ForgetPassword}
/>
<AuthencationStack.Screen
name={"PasswordChange"}
component={PasswordChange}
/>
</AuthencationStack.Navigator>
)
}
export default function App() {
return (
<ThemeProvider {...{ theme }}>
<LoadAssets {...{ fonts, assets }}>
<StatusBar hidden={false} />
<SafeAreaProvider>
<AppStack.Navigator headerMode='none'>
<AppStack.Screen name='Authentication' component={AuthencationNavigator} />
<AppStack.Screen name='Home' component={HomeNavigator} />
</AppStack.Navigator>
</SafeAreaProvider>
</LoadAssets>
</ThemeProvider>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: "center",
justifyContent: "center",
},
})