Skip to content

Commit

Permalink
feat: call onVote when not selected only
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinho1011 committed Mar 7, 2024
1 parent b456426 commit d1ecba3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/A/ATopicCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ const AlphaTopicCard = React.memo(({ topic, onVote, isTrending, isMine }: AlphaT
};

const handleVote = (side: 'CHOICE_A' | 'CHOICE_B') => {
onVote(topic.topicId, side);
if (topic.selectedOption === null) {
onVote(topic.topicId, side);
}
};

const handleOptionClick = () => {};
Expand Down

0 comments on commit d1ecba3

Please sign in to comment.