0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 22:32:45 +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 (
<div className="foundBrews">
<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>
{brewCollection.map((brew, index) => (
<BrewItem
@@ -434,7 +443,7 @@ const ArchivePage = createClass({
</div>
<div className="resultsContainer dataGroup">
<div className="title">
<h2>Your searched returned these results</h2>
<h2>Your search returned these results</h2>
</div>
{this.renderFoundBrews()}
</div>