1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-26 12:21:30 +00:00
This commit is contained in:
Scott Tolksdorf
2018-12-04 13:37:55 -05:00
parent 52c0462a4f
commit bf21c3d351
5 changed files with 34 additions and 34 deletions

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'>