Skip to content

Commit

Permalink
fix: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
helmturner committed Jun 26, 2024
1 parent c88e5a7 commit cc9b565
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/features/voting/ProposalLikeButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default function ProposalLikeButtons({
voteValue,
}: ProposalLikeButtonsProps) {
const handleLikeVote = (type: 'up' | 'down') => {
let currentVoteValue = voteValue ? voteValue : 0;
let currentVoteValue;
currentVoteValue = voteValue ?? 0;

if (type === 'up') currentVoteValue = Math.min(2, currentVoteValue + 1);
else currentVoteValue = Math.max(-2, currentVoteValue - 1);
Expand Down

0 comments on commit cc9b565

Please sign in to comment.