Featured comments should have ACCEPTED status

This commit is contained in:
Belen Curcio
2017-09-08 13:25:23 -03:00
parent 6494669262
commit fefacf039f
2 changed files with 11 additions and 2 deletions
@@ -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]),