Skip to content

Commit

Permalink
Merge pull request #50 from oasisprotocol/ml/fix-choice-override-prev…
Browse files Browse the repository at this point in the history
…ious-vote

Fix choice overriding previous vote
  • Loading branch information
lubej authored Mar 19, 2024
2 parents 68831f5 + b34eb70 commit 1419f05
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/src/pages/HomePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ export const HomePage: FC = () => {
}, [account])

useEffect(() => {
if (!NumberUtils.isValidMascotChoiceId(selectedChoice)) {
if (NumberUtils.isValidMascotChoiceId(previousVote)) {
setSelectedChoice(previousVote)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [previousVote])

const actionBtnLabelContent = useMemo(() => {
Expand Down

0 comments on commit 1419f05

Please sign in to comment.