-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
75 lines (63 loc) · 3.01 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
import React, { Component } from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import HomeScreen from './components/home';
import LoginScreen from './components/login';
import SignupScreen from './components/signup';
import LogoutScreen from './components/logout';
import ProfileScreen from './components/Profile';
import FriendScreen from './components/Friends';
import FriendRequestsScreen from './components/FriendRequests';
import PhotoCaptureScreen from './components/PhotoCapture';
import PostsScreen from './components/Posts';
import UserScreen from './components/User';
import UserUpdateScreen from './components/userInfoUpdate';
import SearchScreen from './components/Search';
export const serverBase = 'http://localhost:3333/api/1.0.0/'
const Tab = createBottomTabNavigator();
const Stack = createNativeStackNavigator();
function TabNavigation() {
return(
<Tab.Navigator>
<Tab.Screen name="Profile" component={ProfileScreen} />
<Tab.Screen name="Friend Requests" component={FriendRequestsScreen} />
<Tab.Screen name="Search" component={SearchScreen} />
<Tab.Screen name="Logout" component={LogoutScreen} />
<Tab.Screen name="Home" component={HomeScreen} />
<Tab.Screen name="User Update" component={UserUpdateScreen} />
</Tab.Navigator>
);
}
class App extends Component {
render(){
return (
<NavigationContainer>
{/* <Tab.Navigator>
<Tab.Screen name="Home" component={HomeScreen} />
<Tab.Screen name="Profile" component={ProfileScreen} />
<Tab.Screen name="Friend Requests" component={FriendRequestsScreen} />
<Tab.Screen name="Logout" component={LogoutScreen} />
<Tab.Screen name="Posts" component={PostsScreen} />
<Tab.Screen name="User" component={UserScreen} />
<Tab.Screen name="User Update" component={UserUpdateScreen} />
<Tab.Screen name="Photo Capture" component={PhotoCaptureScreen} />
<Tab.Screen name="Signup" component={SignupScreen} />
<Tab.Screen name="Login" component={LoginScreen} />
<Tab.Screen name="Friends" component={FriendScreen} />
</Tab.Navigator> */}
<Stack.Navigator>
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="Posts" component={PostsScreen} />
<Stack.Screen name="ProfileScreen" component={TabNavigation} options={{headerShown: false, cardStyle: {flex: 1}}} />
<Stack.Screen name="User" component={UserScreen} />
<Stack.Screen name="User Update" component={UserUpdateScreen} />
<Stack.Screen name="Photo Capture" component={PhotoCaptureScreen} />
<Stack.Screen name="Signup" component={SignupScreen} />
<Stack.Screen name="Friends" component={FriendScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}
}
export default App;