mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-18 06:27:19 +08:00
fix error layouts
This commit is contained in:
parent
eb4b7c78a0
commit
ae40ef4460
@ -373,15 +373,22 @@ module.exports = React.createClass({
|
||||
}
|
||||
}
|
||||
|
||||
let errorTextSection;
|
||||
if (this.state.errorText) {
|
||||
errorTextSection = (
|
||||
<div className="mx_Login_error">
|
||||
{ this.state.errorText }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<LoginPage>
|
||||
<div className="mx_Login_box">
|
||||
<LoginHeader />
|
||||
<div>
|
||||
{ header }
|
||||
<div className="mx_Login_error">
|
||||
{ this.state.errorText }
|
||||
</div>
|
||||
{ errorTextSection }
|
||||
{ this.componentForStep(this.state.currentFlow) }
|
||||
{ serverConfig }
|
||||
<a className="mx_Login_create" onClick={this.props.onRegisterClick} href="#">
|
||||
|
@ -397,7 +397,9 @@ module.exports = React.createClass({
|
||||
}
|
||||
else {
|
||||
header = <h2>{ _t('Create an account') }</h2>;
|
||||
errorText = <div className="mx_Login_error">{ this.state.errorText }</div>;
|
||||
if (this.state.errorText) {
|
||||
errorText = <div className="mx_Login_error">{ this.state.errorText }</div>;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user