This commit is contained in:
Scott Tolksdorf committed 2018-12-06 18:19:43 -05:00
1 parent 52c0462a4f
commit bf21c3d351
5 files changed
+34 -34

No files matched your search

+4 -4
View File
@@ -16,16 +16,16 @@ const Stats = createClass({
totalBrews : 0
},
fetching : false
}
};
},
componentDidMount(){
this.fetchStats();
},
fetchStats(){
this.setState({ fetching : true})
this.setState({ fetching: true });
request.get('/admin/stats')
.then((res)=> this.setState({ stats : res.body }))
.finally(()=>this.setState({fetching : false}));
.then((res)=>this.setState({ stats: res.body }))
.finally(()=>this.setState({ fetching: false }));
},
render(){
return <div className='Stats'>