diff --git a/unleash-server/public/js/unleash.jsx b/unleash-server/public/js/unleash.jsx index 6395a7d707..a9701ce6ef 100644 --- a/unleash-server/public/js/unleash.jsx +++ b/unleash-server/public/js/unleash.jsx @@ -71,9 +71,33 @@ var FeatureList = React.createClass({ }); +var ErrorMessages = React.createClass({ + + + render: function() { + if (!this.props.errors.length) { + return
; + } + + var errorNodes = this.props.errors.map(function(e) { + return (
  • {e}
  • ); + }); + + return ( +
    + +
    + ); + } +}); + var Unleash = React.createClass({ getInitialState: function() { - return { savedFeatures: [], unsavedFeatures: [] }; + return { + savedFeatures: [], + unsavedFeatures: [], + errors: [] + }; }, componentDidMount: function () { @@ -90,7 +114,6 @@ var Unleash = React.createClass({ }, handleError: function (error) { - // TODO: ErrorComponent could use window.alert(error); }, @@ -122,6 +145,7 @@ var Unleash = React.createClass({ return (
    +