mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-14 04:12:43 +00:00
"Simplified conditional statement for displaying total brews count"
This commit is contained in:
@@ -403,16 +403,8 @@ const ArchivePage = createClass({
|
|||||||
return (
|
return (
|
||||||
<div className="foundBrews">
|
<div className="foundBrews">
|
||||||
<span className="totalBrews">
|
<span className="totalBrews">
|
||||||
Brews found:
|
Brews found:
|
||||||
{() => {
|
{title === '' ? '0' : this.state.totalBrews ? this.state.totalBrews : <span className="searchAnim"></span>}
|
||||||
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
|
||||||
@@ -424,6 +416,7 @@ const ArchivePage = createClass({
|
|||||||
{this.renderPaginationControls()}
|
{this.renderPaginationControls()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user