mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-02 23:42:44 +00:00
"Moved and rearranged conditional statements for rendering no search/brews found messages in VaultPage component."
This commit is contained in:
@@ -369,14 +369,6 @@ const VaultPage = (props) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (validateForm() && !brewCollection) {
|
|
||||||
return (
|
|
||||||
<div className="foundBrews noBrews">
|
|
||||||
<h3>No search yet</h3>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
console.log('render Error: ', error);
|
console.log('render Error: ', error);
|
||||||
let errorMessage;
|
let errorMessage;
|
||||||
@@ -403,7 +395,15 @@ const VaultPage = (props) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!brewCollection || brewCollection.length === 0) {
|
if (!brewCollection) {
|
||||||
|
return (
|
||||||
|
<div className="foundBrews noBrews">
|
||||||
|
<h3>No search yet</h3>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (brewCollection.length === 0) {
|
||||||
return (
|
return (
|
||||||
<div className="foundBrews noBrews">
|
<div className="foundBrews noBrews">
|
||||||
<h3>No brews found</h3>
|
<h3>No brews found</h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user