-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
53 lines (47 loc) · 1.52 KB
/
App.js
File metadata and controls
53 lines (47 loc) · 1.52 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
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { createBottomTabNavigator, createSwitchNavigator, createStackNavigator } from 'react-navigation';
import ReportMap from './app/screens/ReportMap';
import ReportList from './app/screens/ReportList';
import ReportDetail from './app/screens/ReportDetail';
import ReportComment from './app/screens/ReportComment';
import ReportForm from './app/screens/ReportForm';
import Participate from './app/screens/Participate';
import Register from './app/screens/Register';
import RegisterSuccess from './app/screens/RegisterSuccess';
import Login from './app/screens/Login';
import OnBoarding from './app/screens/Onboarding';
import AppLoading from './app/screens/AppLoading';
const Tab = createBottomTabNavigator({
Map: ReportMap,
List: ReportList
});
const Main = createStackNavigator({
Participate: {
screen: Participate,
navigationOptions: ({ navigation }) => ({
header: null
}),
},
Register: Register,
RegisterSuccess: RegisterSuccess,
Login: Login,
Tab: {
screen: Tab,
navigationOptions: ({ navigation }) => ({
header: null
}),
},
Detail: ReportDetail,
Comment: ReportComment,
Form: ReportForm,
}, {
initialRouteName: 'Participate',
});
// using switchNavigator so user can't click back button from mainNavigator
const App = createSwitchNavigator({
AppLoading: AppLoading,
OnBoarding: OnBoarding,
Main: Main,
})
export default App;