-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
128 lines (120 loc) · 4.09 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
const Stack = createNativeStackNavigator();
import * as React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { useFonts } from "expo-font";
import Transactions from "./screens/payment/Transactions";
import Home1 from "./screens/Home1";
import FrameScreen from "./screens/FrameScreen";
import Wallet2 from "./screens/Wallet2";
import MoneySent from "./screens/payment/MoneySent";
import SendMoney from "./screens/payment/SendMoney";
import Onboarding3 from "./screens/Onboarding/Onboarding3";
import Onboarding2 from "./screens/Onboarding/Onboarding2";
import Onboarding1 from "./screens/Onboarding/Onboarding1";
import RegisterPhone from "./screens/authentication/askForNumber";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import SendTo from "./screens/payment/SendTo";
import PinPage from "./screens/authentication/enterLoginpin";
import UserDetailScreen from "./screens/authentication/details";
const App = () => {
const [hideSplashScreen, setHideSplashScreen] = React.useState(false);
const [fontsLoaded, error] = useFonts({
Montserrat_regular: require("./assets/fonts/Montserrat_regular.ttf"),
Montserrat_medium: require("./assets/fonts/Montserrat_medium.ttf"),
Montserrat_semibold: require("./assets/fonts/Montserrat_semibold.ttf"),
Montserrat_bold: require("./assets/fonts/Montserrat_bold.ttf"),
Montserrat_extrabold: require("./assets/fonts/Montserrat_extrabold.ttf"),
"Open Sans_bold": require("./assets/fonts/Open_Sans_bold.ttf"),
Poppins_semibold: require("./assets/fonts/Poppins_semibold.ttf"),
Rubik_regular: require("./assets/fonts/Rubik_regular.ttf"),
Inter_regular: require("./assets/fonts/Inter_regular.ttf"),
Roboto_regular: require("./assets/fonts/Roboto_regular.ttf"),
});
React.useEffect(() => {
setTimeout(() => {
setHideSplashScreen(true);
}, 1000);
}, []);
if (!fontsLoaded && !error) {
return null;
}
return (
<NavigationContainer>
{hideSplashScreen ? (
<Stack.Navigator
initialRouteName="Register"
screenOptions={{ headerShown: false }}
>
<Stack.Screen
name="Register"
component={RegisterPhone}
options={{ headerShown: false }}
/>
<Stack.Screen
name="User Details"
component={UserDetailScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Pin Page"
component={PinPage}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Transactions"
component={Transactions}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Home1"
component={Home1}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Frame8"
component={FrameScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Wallet2"
component={Wallet2}
options={{ headerShown: false }}
/>
<Stack.Screen
name="MoneySent"
component={MoneySent}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Send To"
component={SendTo}
options={{ headerShown: false }}
/>
<Stack.Screen
name="SendMoney"
component={SendMoney}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Onboarding3"
component={Onboarding3}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Onboarding2"
component={Onboarding2}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Onboarding1"
component={Onboarding1}
options={{ headerShown: false }}
/>
</Stack.Navigator>
) : (
<FrameScreen />
)}
</NavigationContainer>
);
};
export default App;