Skip to content

Commit

Permalink
Fix rating number for series vote (#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithmohan authored Aug 18, 2024
1 parent a0393f4 commit 7cfa834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Collection/Series/SeriesRating.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const SeriesRating = ({ ratingValue, seriesId }: Props) => {
const [hoveredStar, setHoveredStar] = useState(ratingValue);

const handleVote = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {
voteSeries({ seriesId, rating: toNumber(event.currentTarget.id) }, {
voteSeries({ seriesId, rating: toNumber(event.currentTarget.id) + 1 }, {
onSuccess: () => toast.success('Voted!'),
onError: () => toast.error('Failed to vote!'),
});
Expand Down

0 comments on commit 7cfa834

Please sign in to comment.