Skip to content

Commit a0ef765

Browse files
authored
fix: mf-6624 vote results (#12131)
1 parent 0e07c32 commit a0ef765

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

packages/plugins/Snapshot/src/SiteAdaptor/ResultCard.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ const StyledLinearProgress = styled(LinearProgress)(({ theme }) => ({
9797
}))
9898

9999
function Content() {
100+
const { classes, cx } = useStyles()
100101
const identifier = useContext(SnapshotContext)
101102
const proposal = useProposal(identifier.id)
102103
const votes = useVotes(identifier)
103104
const { results } = useResults(identifier, proposal)
104-
const { classes, cx } = useStyles()
105105

106106
const dataForCsv = useMemo(() => {
107107
if (!isArray(votes)) return EMPTY_LIST
@@ -144,11 +144,7 @@ function Content() {
144144
<Typography className={classes.ellipsisText}>
145145
{result.powerDetail
146146
.flatMap((detail, index) => {
147-
const name = formatCount(
148-
proposal.scores_by_strategy[i][index],
149-
2,
150-
true,
151-
)
147+
const name = formatCount(result.power, 2, true)
152148
return [index === 0 ? '' : '+', name, detail.name]
153149
})
154150
.join(' ')}
@@ -157,7 +153,7 @@ function Content() {
157153
placement="top"
158154
arrow>
159155
<Typography className={classes.power}>
160-
{formatCount(proposal.scores[i], 2, true)}
156+
{formatCount(result.power, 2, true)}
161157
</Typography>
162158
</ShadowRootTooltip>
163159
<Typography className={classes.ratio}>

0 commit comments

Comments
 (0)