-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
69 lines (64 loc) · 1.45 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
import React from 'react';
import {StatusBar} from 'react-native';
import { createStackNavigator, createAppContainer, createSwitchNavigator } from 'react-navigation';
import Home from './src/pages/Home';
import SignIn from './src/pages/SignIn';
import SignUp from './src/pages/SignUp';
import ResetPassword from './src/pages/ResetPassword';
import AuthLoading from './src/pages/AuthLoading';
import TopicDetails from './src/pages/TopicDetails';
// const AppNavigator = createStackNavigator({
// Home: {
// screen: Home
// },
// SignIn: {
// screen: SignIn
// },
// SignUp: {
// screen: SignUp
// },
// ResetPassword: {
// screen: ResetPassword
// }
// }, {
// initialRouteName: 'SignIn'
// });
const AuthStack = createStackNavigator({
SignIn: {
screen: SignIn
},
SignUp: {
screen: SignUp
},
ResetPassword: {
screen: ResetPassword
}
}, {
initialRouteName: 'SignIn'
});
const AppStack = createStackNavigator({
Home: {
screen: Home
},
TopicDetails: {
screen: TopicDetails
}
}, {
initialRouteName: 'Home'
});
export default createAppContainer(createSwitchNavigator({
AuthLoading: AuthLoading,
App: AppStack,
Auth: AuthStack
},{
initialRouteName: 'AuthLoading'
// initialRouteName: 'Auth'
}))
// const Root = () => {
// const Component = createAppContainer(AppNavigator);
// StatusBar.setHidden(false);
// return(
// <Component />
// )
// }
// export default Root;