From ae40ef44606a34e362229a2b1746cd71456ee548 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 25 Oct 2017 02:18:14 +0100 Subject: [PATCH] fix error layouts --- src/components/structures/login/Login.js | 13 ++++++++++--- src/components/structures/login/Registration.js | 4 +++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/components/structures/login/Login.js b/src/components/structures/login/Login.js index c31bdb1cca..44363d83ad 100644 --- a/src/components/structures/login/Login.js +++ b/src/components/structures/login/Login.js @@ -373,15 +373,22 @@ module.exports = React.createClass({ } } + let errorTextSection; + if (this.state.errorText) { + errorTextSection = ( +
+ { this.state.errorText } +
+ ); + } + return (
{ header } -
- { this.state.errorText } -
+ { errorTextSection } { this.componentForStep(this.state.currentFlow) } { serverConfig } diff --git a/src/components/structures/login/Registration.js b/src/components/structures/login/Registration.js index 15e6b536c4..4e95b62be3 100644 --- a/src/components/structures/login/Registration.js +++ b/src/components/structures/login/Registration.js @@ -397,7 +397,9 @@ module.exports = React.createClass({ } else { header =

{ _t('Create an account') }

; - errorText =
{ this.state.errorText }
; + if (this.state.errorText) { + errorText =
{ this.state.errorText }
; + } } return (