mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-03 23:32:58 +00:00
Lint clean up
This commit is contained in:
@@ -61,7 +61,7 @@ const ArchivePage = createClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("LoadPage error: " + error);
|
console.log(`LoadPage error: ${error}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -80,33 +80,37 @@ const ArchivePage = createClass({
|
|||||||
renderFoundBrews() {
|
renderFoundBrews() {
|
||||||
const { title, brewCollection, page, totalPages, error } = this.state;
|
const { title, brewCollection, page, totalPages, error } = this.state;
|
||||||
|
|
||||||
if (title === '') {return (<div className="foundBrews noBrews"><h3>Whenever you want, just start typing...</h3></div>);}
|
if(title === '') {return (<div className='foundBrews noBrews'><h3>Whenever you want, just start typing...</h3></div>);}
|
||||||
|
|
||||||
if (error !== null) { return (
|
if(error !== null) {
|
||||||
<div className="foundBrews noBrews">
|
return (
|
||||||
|
<div className='foundBrews noBrews'>
|
||||||
<div><h3>I'm sorry, your request didn't work</h3>
|
<div><h3>I'm sorry, your request didn't work</h3>
|
||||||
<br /><p>Your search is not specific enough. Too many brews meet this criteria for us to display them.</p>
|
<br /><p>Your search is not specific enough. Too many brews meet this criteria for us to display them.</p>
|
||||||
</div></div>
|
</div></div>
|
||||||
);}
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (!brewCollection || brewCollection.length === 0) { return (
|
if(!brewCollection || brewCollection.length === 0) {
|
||||||
<div className="foundBrews noBrews">
|
return (
|
||||||
|
<div className='foundBrews noBrews'>
|
||||||
<h3>We haven't found brews meeting your request.</h3>
|
<h3>We haven't found brews meeting your request.</h3>
|
||||||
</div>
|
</div>
|
||||||
);}
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="foundBrews">
|
<div className='foundBrews'>
|
||||||
<span className="brewCount">{`Brews Found: ${brewCollection.length}`}</span>
|
<span className='brewCount'>{`Brews Found: ${brewCollection.length}`}</span>
|
||||||
|
|
||||||
{brewCollection.map((brew, index)=>(
|
{brewCollection.map((brew, index)=>(
|
||||||
<BrewItem brew={brew} key={index} reportError={this.props.reportError} />
|
<BrewItem brew={brew} key={index} reportError={this.props.reportError} />
|
||||||
))}
|
))}
|
||||||
<div className="paginationControls">
|
<div className='paginationControls'>
|
||||||
{page > 1 && (
|
{page > 1 && (
|
||||||
<button onClick={()=>this.loadPage(page - 1)}>Previous Page</button>
|
<button onClick={()=>this.loadPage(page - 1)}>Previous Page</button>
|
||||||
)}
|
)}
|
||||||
<span className="currentPage">Page {page}</span>
|
<span className='currentPage'>Page {page}</span>
|
||||||
{page < totalPages && (
|
{page < totalPages && (
|
||||||
<button onClick={()=>this.loadPage(page + 1)}>Next Page</button>
|
<button onClick={()=>this.loadPage(page + 1)}>Next Page</button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user