-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
76 lines (73 loc) · 1.97 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
import React from 'react';
import { createStackNavigator, createSwitchNavigator } from 'react-navigation';
import DashBoard from './components/dashboard';
import CreatePost from './components/createpost';
import PostsList from './components/postslist';
import RequestsList from './components/requestslist';
import ReviewsList from './components/reviewslist';
import ReviewDetails from './components/reviewdetails';
import PostDetails from './components/postdetails';
import RequestDetails from './components/requestdetails';
import Profile from './components/profile';
import SignIn from './components/sign_in';
import SignUp from './components/sign_up';
import AuthLoading from './components/authloading';
export default class App extends React.Component {
render() {
console.disableYellowBox = true;
return (
<RootNavigator/>
);
}
}
const RootNavigator = createSwitchNavigator(
{
AuthLoading: AuthLoading,
Auth: createStackNavigator(
{
SignIn: SignIn,
SignUp: SignUp,
},
{
initialRouteName: 'SignIn',
navigationOptions: {
headerStyle: {
backgroundColor: '#42b97c',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
},
}
),
App: createStackNavigator(
{
DashBoard: DashBoard,
CreatePost: CreatePost,
PostsList: PostsList,
RequestsList: RequestsList,
RequestDetails: RequestDetails,
ReviewsList: ReviewsList,
ReviewDetails: ReviewDetails,
PostDetails: PostDetails,
Profile: Profile,
},
{
initialRouteName: 'DashBoard',
navigationOptions: {
headerStyle: {
backgroundColor: '#42b97c',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
},
}
),
},
{
initialRouteName: 'AuthLoading',
}
);