mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-11 11:12:44 +00:00
BrewSearch: Remove stale piece of React state
This commit is contained in:
@@ -17,16 +17,11 @@ const BrewSearch = createClass({
|
|||||||
return {
|
return {
|
||||||
searchTerm : '',
|
searchTerm : '',
|
||||||
brew : null,
|
brew : null,
|
||||||
searching : false
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
search : function(){
|
search : function(){
|
||||||
this.setState({
|
|
||||||
searching : true
|
|
||||||
});
|
|
||||||
|
|
||||||
request.get(`/homebrew/api/search?id=${this.state.searchTerm}`)
|
request.get(`/homebrew/api/search?id=${this.state.searchTerm}`)
|
||||||
.query({
|
.query({
|
||||||
admin_key : this.props.admin_key,
|
admin_key : this.props.admin_key,
|
||||||
@@ -35,8 +30,6 @@ const BrewSearch = createClass({
|
|||||||
console.log(err, res, res.body.brews[0]);
|
console.log(err, res, res.body.brews[0]);
|
||||||
this.setState({
|
this.setState({
|
||||||
brew : res.body.brews[0],
|
brew : res.body.brews[0],
|
||||||
|
|
||||||
searching : false
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user