1 import React
from 'react';
2 import ImmutablePropTypes
from 'react-immutable-proptypes';
3 import escapeTextContentForBrowser
from 'escape-html';
4 import emojify
from '../emoji';
6 class DisplayName
extends React
.PureComponent
{
9 account: ImmutablePropTypes
.map
.isRequired
13 const displayName
= this.props
.account
.get('display_name').length
=== 0 ? this.props
.account
.get('username') : this.props
.account
.get('display_name');
14 const displayNameHTML
= { __html: emojify(escapeTextContentForBrowser(displayName
)) };
17 <span className
='display-name'>
18 <strong className
='display-name__html' dangerouslySetInnerHTML
={displayNameHTML
} /> <span className
='display-name__account'>@{this.props
.account
.get('acct')}</span
>
25 export default DisplayName
;