-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
129 lines (124 loc) · 3.43 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
129
import { StatusBar } from "expo-status-bar";
import React from "react";
import { StyleSheet, Easing, View } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import {
createStackNavigator,
TransitionPresets,
CardStyleInterpolators,
} from "@react-navigation/stack";
import Splash from "./screens/Splash";
import Login from "./screens/Login";
import Register from "./screens/Register";
import FlashMessage from "react-native-flash-message";
import Home from "./screens/Home";
import Route from "./router/Route";
import Settings from "./screens/Settings";
import LoginInfo_State from "./context/LoginInfo/LoginInfo_State";
import Currency_State from "./context/LoginInfo/Currency_State";
import Graph from "./screens/Graph";
export default function App() {
const config = {
animation: "spring",
config: {
stiffness: 1000,
damping: 500,
mass: 3,
overshootClamping: false,
restDisplacementThreshold: 0.01,
restSpeedThreshold: 0.01,
},
};
const closeConfig = {
animation: "timing",
config: {
duration: 300,
easing: Easing.linear,
},
};
const Stack = createStackNavigator();
return (
<>
<LoginInfo_State>
<Currency_State>
<StatusBar style="auto" />
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerTitleAlign: "center",
gestureEnabled: true,
gestureDirection: "horizontal",
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
transitionSpec: {
open: config,
close: closeConfig,
headerMode: "float",
},
}}
animation="fade"
>
<Stack.Screen
name="Splash"
component={Splash}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="Login"
component={Login}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="Register"
component={Register}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="Route"
component={Route}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="Home"
component={Home}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="Settings"
component={Settings}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="Graph"
component={Graph}
options={{
headerShown: true,
}}
/>
</Stack.Navigator>
</NavigationContainer>
<FlashMessage position={"bottom"} />
</Currency_State>
</LoginInfo_State>
</>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
});