-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
170 lines (148 loc) · 3.25 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
import { AppLoading, Constants, Facebook, Google } from 'expo';
import { Asset } from 'expo-asset';
import * as Font from 'expo-font';
import React from 'react';
import * as WebBrowser from 'expo-web-browser';
import { Provider } from 'react-redux'
import { store } from './redux/app-redux'
import {
Image, Platform, ScrollView, Text, Alert,
StyleSheet, View, TouchableOpacity, Button, StatusBar
} from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import HomeScreen from './screens/HomeScreen'
import * as firebase from 'firebase';
import { firebaseConfig } from './constants/config'
class App extends React.Component {
state = {
isReady: false,
okButton: false
};
componentDidMount() {
// Initialize firebase...
firebase.initializeApp(firebaseConfig)
}
validate = () => {
this.setState({ okButton: true })
}
render() {
if (!this.state.isReady) {
return (
<AppLoading
startAsync={this._cacheResourcesAsync}
onFinish={() => this.setState({ isReady: true })}
onError={console.warn}
/>
);
}
else
return (
<Provider store={store}>
<HomeScreen />
</Provider>
);
}
async _cacheResourcesAsync() {
await Promise.all([
Asset.loadAsync([
require('./assets/images/introAnimationLQ.mp4'),
require('./assets/images/logo.png'),
]),
Font.loadAsync({
// This is the font that we are using for our tab bar
...Ionicons.font,
// We include SpaceMono because we use it in HomeScreen.js. Feel free to
// remove this if you are not using it in your app
'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
}),
]);
}
}
function handleHelpPress() {
WebBrowser.openBrowserAsync(
'https://www.usegalileo.eu/'
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
row: {
flex: 1,
flexDirection: "row"
},
logInOption: {
flex: 1,
flexDirection: "row",
},
contentContainer: {
paddingTop: 30,
},
getStartedText: {
fontSize: 17,
color: 'rgba(96,100,109, 1)',
lineHeight: 24,
textAlign: 'center',
},
title: {
fontSize: 20,
color: 'rgb(174, 33, 87)',
lineHeight: 24,
textAlign: 'center',
},
elevationContainer: {
...Platform.select({
ios: {
shadowColor: 'black',
shadowOffset: { width: 0, height: -3 },
shadowOpacity: 0.1,
shadowRadius: 3,
},
android: {
elevation: 20,
},
}),
alignItems: 'center',
backgroundColor: '#fbfbfb',
paddingVertical: 20,
},
tabBarInfoText: {
fontSize: 17,
color: 'rgba(96,100,109, 1)',
textAlign: 'center',
},
navigationFilename: {
marginTop: 5,
},
helpContainer: {
marginTop: 15,
alignItems: 'center',
},
helpLink: {
paddingVertical: 15,
},
helpLinkText: {
fontSize: 14,
color: '#2e78b7',
},
button: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
},
button2: {
paddingHorizontal: 10
},
});
const mapStateToProp = (state) => {
return {
user: state.user,
}
}
const mapDispatchToProps = (dispatch) => {
return {
}
}
export default App