You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a comment is upvoted, the toast message correctly shows "Comment has been upvoted." However, when the user removes the upvote by clicking again, the same toast message ("Comment has been upvoted") is shown instead of indicating that the vote has been removed and similar for downvoting as well
To Reproduce
Steps to reproduce the behavior:
Upvote a comment.
Observe the toast message "Comment has been upvoted."
Remove the upvote by clicking the upvote button again.
The toast message again says "Comment has been upvoted" instead of indicating that the vote was removed.
similarly,
Downvote a comment.
Observe the toast message "Comment has been downvoted."
Remove the downvote by clicking the downvote button again.
The toast message again says "Comment has been downvoted" instead of indicating that the vote was removed.
Expected behavior
When the user removes the upvote, the toast message should display "Vote has been removed" or something similar, instead of "Comment has been upvoted."
Browser: [e.g., Chrome, Safari]
Version: [e.g., 22]
Additional context
The issue seems to be related to the handleVote logic in the voting component, which does not differentiate between adding a vote and removing a vote.
The text was updated successfully, but these errors were encountered:
Describe the bug
When a comment is upvoted, the toast message correctly shows "Comment has been upvoted." However, when the user removes the upvote by clicking again, the same toast message ("Comment has been upvoted") is shown instead of indicating that the vote has been removed and similar for downvoting as well
To Reproduce
Steps to reproduce the behavior:
similarly,
Expected behavior
When the user removes the upvote, the toast message should display "Vote has been removed" or something similar, instead of "Comment has been upvoted."
Screenshots or GIFs
If applicable, add screenshots or GIFs to help explain the problem.
Screencast from 2024-09-25 20-14-11.webm
Info (please complete the following information):
Browser: [e.g., Chrome, Safari]
Version: [e.g., 22]
Additional context
The issue seems to be related to the handleVote logic in the voting component, which does not differentiate between adding a vote and removing a vote.
The text was updated successfully, but these errors were encountered: