This repository has been archived by the owner on Nov 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
83 lines (78 loc) · 1.92 KB
/
index.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
77
78
79
80
81
82
83
/**
* @format
*/
import React from 'react';
import { AppRegistry, /* Animated, Easing */ } from 'react-native';
import { createAppContainer, createStackNavigator } from 'react-navigation';
import { name as appName } from './app.json';
import {
Splash,
LoginScreen,
JoinScreen,
HomeScreen,
QuestionView,
ChatView,
UserScreen,
Alarm,
WriteScreen,
Mentor,
} from './screens';
import DefaultHeader from './components/DefaultHeader';
const defaultNavigationOptions = (title) => ({
header: props => <DefaultHeader title={title} {...props} />
})
const AppNavigator = createStackNavigator(
{
Splash: {
screen: Splash
},
Login: {
screen: LoginScreen,
navigationOptions: defaultNavigationOptions('로그인'),
},
Join: {
screen: JoinScreen,
navigationOptions: defaultNavigationOptions('회원가입'),
},
Home: {
screen: HomeScreen,
navigationOptions: defaultNavigationOptions('질문 목록'),
},
Question: {
screen: QuestionView,
navigationOptions: defaultNavigationOptions('질문 보기'),
},
Chat: {
screen: ChatView,
// navigationOptions: defaultNavigationOptions(),
},
User: {
screen: UserScreen,
navigationOptions: defaultNavigationOptions('내 정보'),
},
Alarm: {
screen: Alarm,
navigationOptions: defaultNavigationOptions('알림'),
},
Write: {
screen: WriteScreen,
navigationOptions: defaultNavigationOptions('질문 등록'),
},
Mentor: {
screen: Mentor,
navigationOptions: defaultNavigationOptions('멘토링'),
}
},
{
initialRouteName: 'Splash',
// transitionConfig: () => ({
// transitionSpec: {
// duration: 0,
// timing: Animated.timing,
// easing: Easing.step0,
// },
// }),
}
);
const App = createAppContainer(AppNavigator);
AppRegistry.registerComponent(appName, () => App);