Normalized data in Redux, fix for asset URLs when rendered outside request
This commit is contained in:
@@ -7,9 +7,15 @@ const DisplayName = React.createClass({
|
||||
},
|
||||
|
||||
render () {
|
||||
let displayName = this.props.account.get('display_name');
|
||||
|
||||
if (displayName.length === 0) {
|
||||
displayName = this.props.account.get('username');
|
||||
}
|
||||
|
||||
return (
|
||||
<span style={{ display: 'block', maxWidth: '100%', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>
|
||||
<strong style={{ fontWeight: 'bold' }}>{this.props.account.get('display_name')}</strong> <span style={{ fontSize: '14px' }}>@{this.props.account.get('acct')}</span>
|
||||
<strong style={{ fontWeight: 'bold' }}>{displayName}</strong> <span style={{ fontSize: '14px' }}>@{this.props.account.get('acct')}</span>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user