mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
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:
parent
505dda09ae
commit
c257379846
2 changed files with 5 additions and 1 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue