mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
Featured comments should have ACCEPTED status
This commit is contained in:
@@ -342,8 +342,6 @@ export default class Comment extends React.Component {
|
||||
commentClassNames = []
|
||||
} = this.props;
|
||||
|
||||
console.log('STATUS', comment.status);
|
||||
|
||||
if (this.commentIsRejected(comment)) {
|
||||
return <CommentTombstone action="rejected" />;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,17 @@ export default {
|
||||
|
||||
const updated = update(previous, {
|
||||
asset: {
|
||||
comments: {
|
||||
nodes: {
|
||||
$apply: (nodes) => nodes.map((node) => {
|
||||
if (node.id === variables.id) {
|
||||
node.status = 'ACCEPTED';
|
||||
}
|
||||
|
||||
return node;
|
||||
})
|
||||
}
|
||||
},
|
||||
featuredComments: {
|
||||
nodes: {
|
||||
$apply: (nodes) => prependNewNodes(nodes, [comment]),
|
||||
|
||||
Reference in New Issue
Block a user