used classnames module

This commit is contained in:
Zoe 2020-01-13 15:07:34 +00:00
parent a56bf5398d
commit 397637d59d

View File

@ -161,7 +161,8 @@ module.exports = createReactClass({
const joinRules = this.props.room && this.props.room.currentState.getStateEvents("m.room.join_rules", "");
const joinRule = joinRules && joinRules.getContent().join_rule;
const joinRuleClass = "mx_RoomHeader_PrivateIcon" + (joinRule === "invite" ? " mx_RoomHeader_isPrivate" : "");
const joinRuleClass = classNames("mx_RoomHeader_PrivateIcon",
{"mx_RoomHeader_isPrivate": joinRule === "invite"});
if (this.props.onCancelClick) {
cancelButton = <CancelButton onClick={this.props.onCancelClick} />;