-
Notifications
You must be signed in to change notification settings - Fork 0
/
tright.js
73 lines (63 loc) · 2.38 KB
/
tright.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
import React, {Component} from 'react';
import {Text, View, Image,Picker, TouchableOpacity, TouchableNativeFeedback, ListView, RefreshControl} from 'react-native';
import Icon from "react-native-vector-icons/MaterialIcons";
import Menu, { MenuContext, MenuOptions, MenuOption, MenuTrigger } from 'react-native-menu';
import sites from './dsites';
import {Router} from './pithre';
import PithreData from './dtrackers';
import moment from 'moment';
import axios from 'axios';
export default class PithreRight extends Component {
constructor(props){
super(props);
console.info("PithreRight: constructor");
this.state = {
viewList: true,
};
}
componentWillMount(){
console.info("PithreRight: componentWillMount");
}
componentDidMount(){
console.info("PithreRight: componentDidMount");
}
componentWillReceiveProps(){
console.info("PithreRight: componentWillReceiveProps");
}
// shouldComponentUpdate(){
// console.info("PithreRight: shouldComponentUpdate");
// }
componentWillUpdate(){
console.info("PithreRight: componentWillUpdate");
}
componentDidUpdate(){
console.info("PithreRight: componentDidUpdate");
}
componentWillUnmount(){
console.info("PithreRight: componentWillUnmount");
}
render(){
console.info("PithreRight: Render");
return(
<View style={{flex:1,flexDirection:'row',alignItems:'center',
justifyContent:'center',}}>
<TouchableOpacity onPress={() => { this.props.emitter.emit('viewmode');console.log("Emit Reset Event",this.props.emitter);}}
style={{width: 48,height: 48,justifyContent:'center',alignItems:"center",}}>
<Icon name={"view-module"} color="#fff" size={24}/>
</TouchableOpacity>
<TouchableOpacity onPress={() => {this.props.emitter.emit('refresh');console.log("Refresh");}}
style={{width: 48,height: 48,justifyContent:'center',alignItems:"center",}}>
<Icon name="refresh" color="#fff" size={24}/>
</TouchableOpacity>
<TouchableOpacity onPress={() => { this.props.emitter.emit('sortby');console.log("Sort by Icon pressed");}}
style={{width: 48,height: 48,justifyContent:'center',alignItems:"center",}}>
<Icon name="sort" size={24} color="#fff"/>
</TouchableOpacity>
</View>
);
}
}
PithreRight.propTypes = {
onPress: React.PropTypes.func,
emitter: React.PropTypes.object,
};