Add * to comments from staff on preview

This requires the API to include the `is_staff` flag, but it will not change functionality if it is not there, everyone would be considered not staff, which is the current behavior.
This commit is contained in:
Paul Kaplan 2018-10-18 10:14:42 -04:00
parent 505dda09ae
commit c257379846
2 changed files with 5 additions and 1 deletions

View file

@ -111,7 +111,9 @@ class Comment extends React.Component {
<a
className="username"
href={`/users/${author.username}`}
>{author.username}</a>
>
{author.username}{author.is_staff ? '*' : ''}
</a>
<div className="action-list">
{visible ? (
<React.Fragment>
@ -214,6 +216,7 @@ Comment.propTypes = {
author: PropTypes.shape({
id: PropTypes.number,
image: PropTypes.string,
is_staff: PropTypes.bool,
username: PropTypes.string
}),
canDelete: PropTypes.bool,

View file

@ -142,6 +142,7 @@ TopLevelComment.propTypes = {
author: PropTypes.shape({
id: PropTypes.number,
image: PropTypes.string,
is_staff: PropTypes.bool,
username: PropTypes.string
}),
canDelete: PropTypes.bool,