-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathApp.js
More file actions
62 lines (60 loc) · 1.75 KB
/
App.js
File metadata and controls
62 lines (60 loc) · 1.75 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
/* eslint-disable react/jsx-filename-extension */
import React from 'react';
import {
createStackNavigator,
createSwitchNavigator,
createAppContainer,
} from 'react-navigation';
import { Image, TouchableOpacity } from 'react-native';
import HomeView from './views/Home/Home';
import LoginView from './views/Login/Login';
import FeedView from './views/Feed/Feed';
import CreatePostView from './views/CreatePost/CreatePost';
import CommentsView from './views/Comments/Comments';
import SplashScreen from './views/Splash/Splash';
import SettingsView from './views/Settings/Settings';
import MemberListView from './views/MemberList/MemberList';
import DonInfoView from './views/DonInfo/DonInfo';
import EditProfileView from './views/EditProfile/EditProfile';
import defaultStyle from './styles/styles';
const AppStack = createStackNavigator(
{
Home: HomeView,
Feed: FeedView,
CreatePost: CreatePostView,
Comments: CommentsView,
Settings: SettingsView,
MemberList: MemberListView,
DonInfo: DonInfoView,
EditProfile: EditProfileView,
},
{
defaultNavigationOptions: ({ navigation }) => ({
headerTitle: (
<TouchableOpacity
style={{ marginLeft: 'auto', marginRight: 'auto' }}
onPress={() => {
navigation.navigate('Home');
}}
>
<Image
source={require('./assets/header-logo.png')}
style={{ height: 40, width: 40 }}
/>
</TouchableOpacity>
),
headerStyle: defaultStyle.primaryColor,
headerTintColor: '#FFFFFF',
}),
},
);
export default createAppContainer(
createSwitchNavigator(
{
Splash: SplashScreen,
Auth: LoginView,
App: AppStack,
},
{ initialRouteName: 'Splash' },
),
);