revert name overengineering, undefined onClick should be fine on div

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-05-12 21:06:36 +01:00
parent 5e4467adce
commit 69d860e982

View File

@ -226,17 +226,11 @@ module.exports = React.createClass({
roomName = this.props.room.name; roomName = this.props.room.name;
} }
const innerName = name =
<EmojiText element="div" <div className="mx_RoomHeader_name" onClick={this.props.onSettingsClick}>
className={ "mx_RoomHeader_nametext " + (settingsHint ? "mx_RoomHeader_settingsHint" : "") } <EmojiText element="div" className={ "mx_RoomHeader_nametext " + (settingsHint ? "mx_RoomHeader_settingsHint" : "") } title={ roomName }>{roomName}</EmojiText>
title={ roomName }>{roomName}</EmojiText>; { searchStatus }
</div>;
if (this.props.onSettingsClick) {
name = <div className="mx_RoomHeader_name" onClick={this.props.onSettingsClick}>{ innerName }{ searchStatus }</div>;
} else {
name = <div className="mx_RoomHeader_name">{ innerName }{ searchStatus }</div>;
}
} }
if (can_set_room_topic) { if (can_set_room_topic) {