big fix in error handling

This commit is contained in:
or-else
2017-10-01 16:08:02 -07:00
parent 378cd622c4
commit b6a831ec91
+9 -3
View File
@@ -1197,7 +1197,8 @@
<ErrorPanel <ErrorPanel
level={this.props.errorLevel} level={this.props.errorLevel}
text={this.props.errorText} /> text={this.props.errorText}
onClearError={this.props.onError} />
{this.props.state === 'login' ? {this.props.state === 'login' ?
<LoginView login={this.props.login} <LoginView login={this.props.login}
@@ -1259,6 +1260,9 @@
hide: function() { hide: function() {
this.setState({show: false}); this.setState({show: false});
if (this.props.onClearError) {
this.props.onClearError();
}
}, },
render: function() { render: function() {
@@ -2277,7 +2281,8 @@
{this.props.displayMobile ? {this.props.displayMobile ?
<ErrorPanel <ErrorPanel
level={this.props.errorLevel} level={this.props.errorLevel}
text={this.props.errorText} /> : null} text={this.props.errorText}
onClearError={this.props.onError} /> : null}
{this.state.showMemberPanel ? {this.state.showMemberPanel ?
<GroupManager <GroupManager
members={this.state.contactList} members={this.state.contactList}
@@ -2887,7 +2892,8 @@
{this.props.displayMobile ? {this.props.displayMobile ?
<ErrorPanel <ErrorPanel
level={this.props.errorLevel} level={this.props.errorLevel}
text={this.props.errorText} /> : null} text={this.props.errorText}
onClearError={this.props.onError} /> : null}
<LoadSpinner show={this.state.fetchingMessages} /> <LoadSpinner show={this.state.fetchingMessages} />
<div id="messages-panel" <div id="messages-panel"
className={this.state.writeOnly ? "write-only" : null} className={this.state.writeOnly ? "write-only" : null}