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({
</WrapSmall>
</AutoColumn>
<ProgressWrapper>
{forPercentage && <Progress status={'for'} percentageString={`${forPercentage.toFixed(0)}%`} />}
<Progress
status={'for'}
percentageString={
proposalData?.forCount.greaterThan(0) ? `${forPercentage?.toFixed(0) ?? 0}%` : '0%'
}
/>
</ProgressWrapper>
</CardSection>
</StyledDataCard>
......@@ -355,9 +360,12 @@ export default function VotePage({
</WrapSmall>
</AutoColumn>
<ProgressWrapper>
{againstPercentage && (
<Progress status={'against'} percentageString={`${againstPercentage.toFixed(0)}%`} />
)}
<Progress
status={'against'}
percentageString={
proposalData?.againstCount?.greaterThan(0) ? `${againstPercentage?.toFixed(0) ?? 0}%` : '0%'
}
/>
</ProgressWrapper>
</CardSection>
</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