Redesign public hashtag page to use a masonry layout (#9822)
This commit is contained in:
parent
4ab42287c0
commit
bc642ac24b
11 changed files with 392 additions and 77 deletions
|
@ -1,15 +1,17 @@
|
|||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export default class DisplayName extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
account: ImmutablePropTypes.map.isRequired,
|
||||
others: ImmutablePropTypes.list,
|
||||
localDomain: PropTypes.string,
|
||||
};
|
||||
|
||||
render () {
|
||||
const { account, others } = this.props;
|
||||
const { account, others, localDomain } = this.props;
|
||||
const displayNameHtml = { __html: account.get('display_name_html') };
|
||||
|
||||
let suffix;
|
||||
|
@ -17,7 +19,13 @@ export default class DisplayName extends React.PureComponent {
|
|||
if (others && others.size > 1) {
|
||||
suffix = `+${others.size}`;
|
||||
} else {
|
||||
suffix = <span className='display-name__account'>@{account.get('acct')}</span>;
|
||||
let acct = account.get('acct');
|
||||
|
||||
if (acct.indexOf('@') === -1 && localDomain) {
|
||||
acct = `${acct}@${localDomain}`;
|
||||
}
|
||||
|
||||
suffix = <span className='display-name__account'>@{acct}</span>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue