Skip to content

Commit

Permalink
don't rollback optimistic updates on likes
Browse files Browse the repository at this point in the history
  • Loading branch information
kualta committed Jun 30, 2024
1 parent 1b0d06e commit 3e3752c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/post/PostReactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ export function ReactionsList({
});
const result = (await response.json()).result;
if (!result) {
setIsLiked(!isLiked);
setLikes(likes - 1);
console.error("Failed to like post");
}
};

Expand Down

0 comments on commit 3e3752c

Please sign in to comment.