Skip to content

Commit

Permalink
feat(case-details-card): only vote in vote period
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras committed Feb 13, 2019
1 parent 4de1eb9 commit 877e505
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/case-details-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const CaseDetailsCard = ({ ID }) => {
draws[draws.length - 1].returnValues._appeal,
draws[draws.length - 1].returnValues._voteID
)
if (dispute2 && vote)
if (dispute && dispute2 && vote)
votesData = draws.reduce(
(acc, d) => {
if (
Expand All @@ -194,7 +194,7 @@ const CaseDetailsCard = ({ ID }) => {
return acc
},
{
canVote: !vote.voted,
canVote: dispute.period === '2' && !vote.voted,
loading: false,
voteIDs: [],
voted: vote.voted && vote.choice
Expand Down

0 comments on commit 877e505

Please sign in to comment.