0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 01:22:44 +00:00

should render an icon while loading total count

This commit is contained in:
Víctor Losada Hernández
2024-05-22 08:13:21 +02:00
parent 4d7b1864d9
commit 888cf55b3d

View File

@@ -403,7 +403,16 @@ const ArchivePage = createClass({
return ( return (
<div className="foundBrews"> <div className="foundBrews">
<span className="totalBrews"> <span className="totalBrews">
Brews found: {this.state.totalBrews} Brews found:
{() => {
if (title == '') {
return '0';
}
if (this.state.totalBrews) {
return this.state.totalBrews;
}
return '<span className="searchAnim"></span>';
}}
</span> </span>
{brewCollection.map((brew, index) => ( {brewCollection.map((brew, index) => (
<BrewItem <BrewItem
@@ -434,7 +443,7 @@ const ArchivePage = createClass({
</div> </div>
<div className="resultsContainer dataGroup"> <div className="resultsContainer dataGroup">
<div className="title"> <div className="title">
<h2>Your searched returned these results</h2> <h2>Your search returned these results</h2>
</div> </div>
{this.renderFoundBrews()} {this.renderFoundBrews()}
</div> </div>