Commit a0e14bef authored by Jordan Frankfurt's avatar Jordan Frankfurt Committed by GitHub

fix(vote): allow 0-vote proposals to render (#3536)

parent 9b5a53b2
...@@ -336,7 +336,12 @@ export default function VotePage({ ...@@ -336,7 +336,12 @@ export default function VotePage({
</WrapSmall> </WrapSmall>
</AutoColumn> </AutoColumn>
<ProgressWrapper> <ProgressWrapper>
{forPercentage && <Progress status={'for'} percentageString={`${forPercentage.toFixed(0)}%`} />} <Progress
status={'for'}
percentageString={
proposalData?.forCount.greaterThan(0) ? `${forPercentage?.toFixed(0) ?? 0}%` : '0%'
}
/>
</ProgressWrapper> </ProgressWrapper>
</CardSection> </CardSection>
</StyledDataCard> </StyledDataCard>
...@@ -355,9 +360,12 @@ export default function VotePage({ ...@@ -355,9 +360,12 @@ export default function VotePage({
</WrapSmall> </WrapSmall>
</AutoColumn> </AutoColumn>
<ProgressWrapper> <ProgressWrapper>
{againstPercentage && ( <Progress
<Progress status={'against'} percentageString={`${againstPercentage.toFixed(0)}%`} /> status={'against'}
)} percentageString={
proposalData?.againstCount?.greaterThan(0) ? `${againstPercentage?.toFixed(0) ?? 0}%` : '0%'
}
/>
</ProgressWrapper> </ProgressWrapper>
</CardSection> </CardSection>
</StyledDataCard> </StyledDataCard>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment