Add user badges to post preview #1765 (#2555)

This commit is contained in:
Ian Morland 2021-02-10 18:53:59 +00:00 committed by GitHub
parent 76d6442557
commit 95b021a839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@ import avatar from '../../common/helpers/avatar';
import username from '../../common/helpers/username'; import username from '../../common/helpers/username';
import DiscussionControls from '../utils/DiscussionControls'; import DiscussionControls from '../utils/DiscussionControls';
import ComposerPostPreview from './ComposerPostPreview'; import ComposerPostPreview from './ComposerPostPreview';
import listItems from '../../common/helpers/listItems';
/** /**
* The `ReplyPlaceholder` component displays a placeholder for a reply, which, * The `ReplyPlaceholder` component displays a placeholder for a reply, which,
@ -25,6 +26,7 @@ export default class ReplyPlaceholder extends Component {
{avatar(app.session.user, { className: 'PostUser-avatar' })} {avatar(app.session.user, { className: 'PostUser-avatar' })}
{username(app.session.user)} {username(app.session.user)}
</h3> </h3>
<ul className="PostUser-badges badges">{listItems(app.session.user.badges().toArray())}</ul>
</div> </div>
</header> </header>
<ComposerPostPreview className="Post-body" composer={app.composer} surround={this.anchorPreview.bind(this)} /> <ComposerPostPreview className="Post-body" composer={app.composer} surround={this.anchorPreview.bind(this)} />