From 3f9c7a1794acb2ddf9d2b4050b482bdab5202dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Fri, 9 Aug 2024 23:15:59 +0200 Subject: [PATCH] "Moved and rearranged conditional statements for rendering no search/brews found messages in VaultPage component." --- client/homebrew/pages/vaultPage/vaultPage.jsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.jsx b/client/homebrew/pages/vaultPage/vaultPage.jsx index 4ec9b7d6e..23c48439e 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.jsx +++ b/client/homebrew/pages/vaultPage/vaultPage.jsx @@ -369,14 +369,6 @@ const VaultPage = (props) => { ); } - if (validateForm() && !brewCollection) { - return ( -
-

No search yet

-
- ); - } - if (error) { console.log('render Error: ', error); let errorMessage; @@ -403,7 +395,15 @@ const VaultPage = (props) => { ); } - if (!brewCollection || brewCollection.length === 0) { + if (!brewCollection) { + return ( +
+

No search yet

+
+ ); + } + + if (brewCollection.length === 0) { return (

No brews found