-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
97 lines (92 loc) · 2.75 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import React, {Component} from "react";
import {
Image,
StyleSheet,
View,
Header,
Alert,
PushNotificationIOS,
} from "react-native";
import {
createStackNavigator,
createAppContainer,
NavigationActions,
} from "react-navigation";
import PushNotification from "react-native-push-notification";
import NavigationService from "./NavigationService.js";
import List from "./src/List.js";
import Questions from "./src/Questions.js";
import Question from "./src/Question.js";
import Settings from "./src/Settings.js";
import LogIn from "./src/LogIn.js";
import Splash from "./src/Splash.js";
import BeepRepresentation from "./src/BeepRepresentation.js";
import ResearchChoice from "./src/ResearchChoice.js";
import ResearchDescription from "./src/ResearchDescription.js";
import PersonalInfo from "./src/PersonalInfo.js";
import LoadingNewUsers from "./src/LoadingNewUsers.js";
import Analitics from "./src/Analitics.js";
const AppNavigator = createStackNavigator(
{
Index: Questions,
NewBeep: Questions,
Beeps: List,
Binary: Question,
Text: Question,
Tags: Question,
TagsNoAdd: Question,
Location: Question,
MultipleChoice: Question,
Slider: Question,
Settings: Settings,
LogIn: LogIn,
Splash: Splash,
BeepRepresentation: BeepRepresentation,
ResearchChoice: ResearchChoice,
ResearchDescription: ResearchDescription,
PersonalInfo: PersonalInfo,
LoadingNewUsers: LoadingNewUsers,
Analitics: Analitics,
},
{
initialRouteName: "Splash",
defaultNavigationOptions: {
headerStyle: {
backgroundColor: "#4e4d4d",
color: "white",
shadowColor: "transparent",
elevation: 0,
},
headerTintColor: "white",
headerBackground: (
<Image
style={{
position: "absolute",
top: 0,
botton: 0,
alignSelf: "center",
}}
source={require("./src/ui/header.png")}
/>
),
},
},
);
PushNotification.configure({
onNotification: function(notification) {
NavigationService.navigate("Index");
notification.finish(PushNotificationIOS.FetchResult.NoData);
},
});
const AppContainer = createAppContainer(AppNavigator);
export default class App extends React.Component {
render() {
return (
<AppContainer
ref={navigatorRef => {
NavigationService.setTopLevelNavigator(navigatorRef);
}}
/>
);
}
}