mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-05 23:12:39 +00:00
Move exit condition to start
This commit is contained in:
@@ -6,6 +6,7 @@ import Dialog from '../../../components/dialog.jsx';
|
|||||||
const DISMISS_BUTTON = <i className='fas fa-times dismiss' />;
|
const DISMISS_BUTTON = <i className='fas fa-times dismiss' />;
|
||||||
|
|
||||||
const ErrorBar = (props)=>{
|
const ErrorBar = (props)=>{
|
||||||
|
if(!props.errors.length) return null;
|
||||||
let hasOpenError = false, hasCloseError = false, hasMatchError = false;
|
let hasOpenError = false, hasCloseError = false, hasMatchError = false;
|
||||||
|
|
||||||
props.errors.map( err => {
|
props.errors.map( err => {
|
||||||
@@ -33,9 +34,6 @@ const ErrorBar = (props)=>{
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!props.errors.length) return null;
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog className='errorBar' closeText={DISMISS_BUTTON} >
|
<Dialog className='errorBar' closeText={DISMISS_BUTTON} >
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user