Fixed error message always appearing for group rename.

This commit is contained in:
Warrick Corfe-Tan 2021-06-16 10:45:22 +10:00
parent 8c0bec7a97
commit e8d06e86b5

View file

@ -85,9 +85,17 @@ class UpdateGroupNameDialogInner extends React.Component<Props, State> {
onClose={() => this.closeDialog()} onClose={() => this.closeDialog()}
theme={this.props.theme} theme={this.props.theme}
> >
<div className="spacer-md" />
<p className={errorMessageClasses}>{errorMsg}</p> { this.state.errorDisplayed ?
<div className="spacer-md" /> <>
<div className="spacer-md" />
<p className={errorMessageClasses}>{errorMsg}</p>
<div className="spacer-md" />
</>
:
null
}
{this.renderAvatar()} {this.renderAvatar()}
<div className="spacer-md" /> <div className="spacer-md" />
@ -95,7 +103,7 @@ class UpdateGroupNameDialogInner extends React.Component<Props, State> {
type="text" type="text"
className="profile-name-input" className="profile-name-input"
value={this.state.groupName} value={this.state.groupName}
placeholder={this.props.i18n('groupNamePlaceholder')} placeholder={window.i18n('groupNamePlaceholder')}
onChange={this.onGroupNameChanged} onChange={this.onGroupNameChanged}
tabIndex={0} tabIndex={0}
required={true} required={true}