diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx
index 0b030c668..e951e4aaa 100644
--- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx
+++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx
@@ -7,67 +7,36 @@ import Dialog from '../../../components/dialog.jsx';
const DISMISS_BUTTON = ;
-const ErrorBar = ( props ) => {
- let hasOpenError = false;
- let hasCloseError = false;
- let hasMatchError = false;
+const ErrorBar = (props) => {
+ let hasOpenError = false, hasCloseError = false, hasMatchError = false;
- const renderErrors = () => {
- hasOpenError = false;
- hasCloseError = false;
- hasMatchError = false;
+ const renderErrors = () => (
+
+ {_.map(props.errors, (err, idx) => {
+ if (err.id === 'OPEN') hasOpenError = true;
+ if (err.id === 'CLOSE') hasCloseError = true;
+ if (err.id === 'MISMATCH') hasMatchError = true;
+ return (
+ -
+ Line {err.line} : {err.text}, '{err.type}' tag
+
+ );
+ })}
+
+ );
- const errors = _.map(props.errors, (err, idx) => {
- if (err.id === 'OPEN') hasOpenError = true;
- if (err.id === 'CLOSE') hasCloseError = true;
- if (err.id === 'MISMATCH') hasMatchError = true;
-
- return (
-
- Line {err.line} : {err.text}, '{err.type}' tag
-
- );
- });
-
- return ;
- };
-
- const renderProtip = () => {
- const msg = [];
- if (hasOpenError) {
- msg.push(
-
- An unmatched opening tag means there's an opened tag that isn't closed. You need to close your tags, like this {'
'}. Make sure to match types!
-
- );
- }
-
- if (hasCloseError) {
- msg.push(
-
- An unmatched closing tag means you closed a tag without opening it. Either remove it, or check to where you think you opened it.
-
- );
- }
-
- if (hasMatchError) {
- msg.push(
-
- A type mismatch means you closed a tag, but the last open tag was a different type.
-
- );
- }
-
- return (
-
-
Protips!
- {msg}
-
- );
- };
+ const renderProtip = () => (
+
+
Protips!
+ {hasOpenError &&
Unmatched opening tag. Close your tags, like this {'
'}. Match types!
}
+ {hasCloseError && Unmatched closing tag. Either remove it or check where it was opened.
}
+ {hasMatchError && Type mismatch. Closed a tag with a different type.
}
+
+ );
if (!props.errors.length) return null;
+
return (