Bookmarks and fast reactions
This commit is contained in:
@@ -11,10 +11,9 @@ let Comment = ({ comment, postid, viewer }) => {
|
||||
let [likes, changeLikes] = useState(Object.keys(comment.reactions).length);
|
||||
const newCommentReaction = () => {
|
||||
if (!comment.reactions[viewer._id]) {
|
||||
API.newCommentReaction(postid, comment.createdAt).then(() => {
|
||||
comment.reactions[viewer._id] = { type: "like" };
|
||||
changeLikes(likes+1);
|
||||
});
|
||||
comment.reactions[viewer._id] = { type: "like" };
|
||||
changeLikes(likes+1);
|
||||
API.newCommentReaction(postid, comment.createdAt);
|
||||
} else {
|
||||
//API.removePostReaction(viewer._id).then(() => {
|
||||
// delete comment.reactions[viewer._id];
|
||||
|
||||
Reference in New Issue
Block a user