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;
}
const innerName =
<EmojiText element="div"
className={ "mx_RoomHeader_nametext " + (settingsHint ? "mx_RoomHeader_settingsHint" : "") }
title={ roomName }>{roomName}</EmojiText>;
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>;
}
name =
<div className="mx_RoomHeader_name" onClick={this.props.onSettingsClick}>
<EmojiText element="div" className={ "mx_RoomHeader_nametext " + (settingsHint ? "mx_RoomHeader_settingsHint" : "") } title={ roomName }>{roomName}</EmojiText>
{ searchStatus }
</div>;
}
if (can_set_room_topic) {