don't accept/reject when a comment is already accepted/rejected respectively

This commit is contained in:
Riley Davis
2017-05-04 14:42:43 -06:00
parent 5168f563ef
commit 67b17160cb
@@ -74,8 +74,8 @@ const Comment = ({actions = [], comment, ...props}) => {
user={comment.user}
status={comment.status}
active={active}
acceptComment={() => props.acceptComment({commentId: comment.id})}
rejectComment={() => props.rejectComment({commentId: comment.id})} />;
acceptComment={() => comment.status === 'ACCEPTED' ? null : props.acceptComment({commentId: comment.id})}
rejectComment={() => comment.status === 'REJECTED' ? null : props.rejectComment({commentId: comment.id})} />;
})}
</div>
</div>