-
Notifications
You must be signed in to change notification settings - Fork 2
/
App.js
92 lines (88 loc) · 2.93 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
import { NavigationContainer } from "@react-navigation/native";
import {
CardStyleInterpolators, createStackNavigator
} from "@react-navigation/stack";
import React, { createContext, useState } from 'react';
import { fromLeft } from "react-navigation-transitions";
import Cadastrar from "./Views/Login/Cadastrar";
import Logar from "./Views/Login/Logar";
import Login from "./Views/Login/Login";
import Mensagem1 from "./Views/MensagensIniciais/Mensagem1";
import Mensagem2 from "./Views/MensagensIniciais/Mensagem2";
import PaginaInicial from "./Views/PaginaPrincipal/PaginaInicial";
const Stack = createStackNavigator();
export const UserContext = createContext("");
function App(navigation) {
const [user, setUser] = useState("");
return (
<UserContext.Provider value={{ user, setUser }}>
<NavigationContainer>
<Stack.Navigator
initialRouteName="Mensagem1"
transitionConfig={() => fromLeft(1000)}
>
<Stack.Screen
name="Mensagem1"
component={Mensagem1}
options={{
tabBarStyle: { display: "none" },
headerShown: false,
tabBarShowLabel: false,
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
}}
/>
<Stack.Screen
name="Mensagem2"
component={Mensagem2}
options={{
tabBarStyle: { display: "none" },
headerShown: false,
tabBarShowLabel: false,
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
}}
/>
<Stack.Screen
name="Login"
component={Login}
options={{
tabBarStyle: { display: "none" },
headerShown: false,
tabBarShowLabel: false,
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
}}
/>
<Stack.Screen
name="Logar"
component={Logar}
options={{
tabBarStyle: { display: "none" },
headerShown: false,
tabBarShowLabel: false,
}}
/>
<Stack.Screen
name="Cadastrar"
component={Cadastrar}
options={{
tabBarStyle: { display: "none" },
headerShown: false,
tabBarShowLabel: false,
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
}}
/>
<Stack.Screen
name="PaginaInicial"
component={PaginaInicial}
options={{
tabBarStyle: { display: "none" },
headerShown: false,
tabBarShowLabel: false,
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
}}
/>
</Stack.Navigator>
</NavigationContainer>
</UserContext.Provider>
);
}
export default App;