From 215888baf43ae4143546eb32d2da519775d35067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 22 May 2024 08:21:00 +0200 Subject: [PATCH] "Simplified conditional statement for displaying total brews count" --- client/homebrew/pages/archivePage/archivePage.jsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/client/homebrew/pages/archivePage/archivePage.jsx b/client/homebrew/pages/archivePage/archivePage.jsx index fdd9d9131..bd55e15f7 100644 --- a/client/homebrew/pages/archivePage/archivePage.jsx +++ b/client/homebrew/pages/archivePage/archivePage.jsx @@ -403,16 +403,8 @@ const ArchivePage = createClass({ return (
- Brews found: - {() => { - if (title == '') { - return '0'; - } - if (this.state.totalBrews) { - return this.state.totalBrews; - } - return ''; - }} + Brews found: + {title === '' ? '0' : this.state.totalBrews ? this.state.totalBrews : } {brewCollection.map((brew, index) => ( ); + }, render: function () {