1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-11 02:12:53 +00:00

beautified

This commit is contained in:
2016-09-01 13:11:17 +00:00
parent f8ccec7ae0
commit f8c89b4486
16 changed files with 107 additions and 104 deletions

View File

@@ -3,21 +3,21 @@ import 'whatwg-fetch';
export default class SensorList extends React.Component {
constructor(){
constructor() {
super();
this.state = {
sensors : {},
sensors: {},
fetching: false,
fetched: false
}
}
componentDidMount(){
componentDidMount() {
this.loadSensorData();
}
loadSensorData(){
loadSensorData() {
this.setState({
fetching: true
});
@@ -49,7 +49,7 @@ export default class SensorList extends React.Component {
</div>
);
}
render(){
render() {
return (
<div>
{this.state.fetched ? this.state.sensors.map(this.insertSensorData) : null}