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