Simplify SenderProfile DOM structure
This commit is contained in:
parent
cf8e49729a
commit
d362321706
2 changed files with 11 additions and 21 deletions
|
@ -110,19 +110,12 @@ export default class SenderProfile extends React.Component {
|
|||
|
||||
const nameElem = name || '';
|
||||
|
||||
// Name + flair
|
||||
const nameFlair = <span>
|
||||
<span className={`mx_SenderProfile_name ${colorClass}`}>
|
||||
{ nameElem }
|
||||
</span>
|
||||
{ flair }
|
||||
</span>;
|
||||
|
||||
return (
|
||||
<div className="mx_SenderProfile" dir="auto" onClick={this.props.onClick}>
|
||||
<div className="mx_SenderProfile_hover">
|
||||
{ nameFlair }
|
||||
</div>
|
||||
<div className="mx_SenderProfile mx_SenderProfile_hover" dir="auto" onClick={this.props.onClick}>
|
||||
<span className={`mx_SenderProfile_name ${colorClass}`}>
|
||||
{ nameElem }
|
||||
</span>
|
||||
{ flair }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue