-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmessages.js
More file actions
73 lines (63 loc) · 1.94 KB
/
Copy pathmessages.js
File metadata and controls
73 lines (63 loc) · 1.94 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
63
64
65
66
67
68
69
70
71
72
73
import React, { Component } from 'react';
import { Text, StyleSheet, TouchableHighlight, View, Dimensions } from 'react-native';
import md5 from 'blueimp-md5';
import { Grid, Row, Col } from 'react-native-easy-grid';
import { Avatar, Button, FormInput } from 'react-native-elements';
import { connect } from 'react-redux';
import { firebaseConnect } from 'react-redux-firebase';
import { Font } from 'expo';
const styles = StyleSheet.create({
statsContainer: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#FFF',
height: 40,
},
stats: {
fontWeight: '700'
}
});
@firebaseConnect()
class MessagesScreen extends Component{
state = {
fontLoaded: false,
};
static navigationOptions = ({ navigation }) => ({
headerTintColor: 'orange',
headerStyle: {
backgroundColor: '#3399cc'
},
title: 'Challenge Lounge',
});
async componentDidMount() {
await Font.loadAsync({
'Bauhaus93': require('./assets/fonts/Bauhaus-93_6274.ttf'),
});
this.setState({ fontLoaded: true });
}
render(){
return(
<View>
{
this.state.fontLoaded ? (
<TouchableHighlight style={{alignItems: 'center', justifyContent: 'center', marginTop: Dimensions.get('window').height * .30}}>
<Text style={{fontFamily: 'Bauhaus93', fontSize: 32 }}>
Sorry :/ {'\n'}
There are no messages...
</Text>
</TouchableHighlight>
) : null
}
</View>
);
}
}
const MapStateToProps = (state) => {
//console.log(state);
return {
auth: state.firebase.auth, // auth passed as props.auth
profile: state.firebase.profile // profile passed as props.profile
}
}
export default connect(MapStateToProps)(MessagesScreen);