mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-27 07:12:39 +00:00
remove unused logic from loadpage
This commit is contained in:
@@ -47,21 +47,19 @@ const ArchivePage = createClass({
|
||||
},
|
||||
|
||||
loadPage : async function(page) {
|
||||
if(this.state.title == '') {} else {
|
||||
|
||||
try {
|
||||
//this.updateUrl();
|
||||
this.setState({ searching: true, error: null });
|
||||
const title = encodeURIComponent(this.state.title);
|
||||
await request.get(`/api/archive?title=${title}&page=${page}`)
|
||||
.then((response)=>{
|
||||
if(response.ok) {
|
||||
this.updateStateWithBrews(response.body.brews, page, response.body.totalPages);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(`LoadPage error: ${error}`);
|
||||
}
|
||||
this.updateUrl();
|
||||
try {
|
||||
//this.updateUrl();
|
||||
this.setState({ searching: true, error: null });
|
||||
const title = encodeURIComponent(this.state.title);
|
||||
await request.get(`/api/archive?title=${title}&page=${page}`)
|
||||
.then((response)=>{
|
||||
if(response.ok) {
|
||||
this.updateStateWithBrews(response.body.brews, page, response.body.totalPages);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(`LoadPage error: ${error}`);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user