-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
104 lines (100 loc) · 2.73 KB
/
App.js
File metadata and controls
104 lines (100 loc) · 2.73 KB
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
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { StyleSheet, Text, View } from "react-native";
import LoginScreen from "./components/LoginScreen";
import NavBar from "./screens/NavBar";
import HomePage from "./screens/HomePage";
import Settings from "./screens/Settings";
import Logout from "./screens/Logout";
import Chat from "./screens/Chat";
import FindActivs from "./screens/FindActivs";
import MyActivs from "./screens/MyActivs";
import UserContext from "./data/UserContext";
import { useState } from "react";
export default function App() {
const Stack = createNativeStackNavigator();
const [user, setUser] = useState({
email: "Antananarywa.adsa@gmail.com",
id: 121,
isLoggedIn: true,
accessToken: "Asdasdasdasda",
refreshToken: "Awdawdawdadad",
firstName: "Mateusz",
lastName: "Jam",
isStudent: true,
isTeacher: true,
isUserLoaded: true,
});
return (
<UserContext.Provider value={{ user, setUser }}>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="LoginScreen"
component={LoginScreen}
options={{
title: "Please log in!",
headerBackVisible: false,
}}
/>
<Stack.Screen
name="HomePage"
component={HomePage}
options={{
title: null,
headerBackVisible: false,
}}
/>
<Stack.Screen
name="Settings"
component={Settings}
options={{
title: null,
headerBackVisible: false,
}}
/>
<Stack.Screen
name="Logout"
component={Logout}
options={{
title: null,
headerBackVisible: false,
}}
/>
<Stack.Screen
name="Chat"
component={Chat}
options={{
title: null,
headerBackVisible: false,
}}
/>
<Stack.Screen
name="FindActivs"
component={FindActivs}
options={{
title: null,
headerBackVisible: false,
}}
/>
<Stack.Screen
name="MyActivs"
component={MyActivs}
options={{
title: null,
headerBackVisible: false,
}}
/>
</Stack.Navigator>
</NavigationContainer>
</UserContext.Provider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
});