diff --git a/src/status/DecryptedVotes.tsx b/src/status/DecryptedVotes.tsx index 8bef17a0..bdeddd9a 100644 --- a/src/status/DecryptedVotes.tsx +++ b/src/status/DecryptedVotes.tsx @@ -1,5 +1,6 @@ import { orderBy } from 'lodash-es' import { flatten } from 'lodash-es' +import { defaultRankingsAllowed } from 'src/vote/RankedChoiceItem' import { unTruncateSelection } from './un-truncate-selection' import { useDecryptedVotes } from './use-decrypted-votes' @@ -14,11 +15,13 @@ export const DecryptedVotes = ({ proofsPage }: { proofsPage?: boolean }): JSX.El const sorted_votes = orderBy(votes, 'tracking') const columns = flatten( - ballot_design.map(({ id, multiple_votes_allowed }) => { - return multiple_votes_allowed - ? new Array(multiple_votes_allowed).fill('').map((_, index) => `${id || 'vote'}_${index + 1}`) - : id || 'vote' - }), + ballot_design?.map(({ id, multiple_votes_allowed, type }) => + multiple_votes_allowed || type === 'ranked-choice-irv' + ? new Array(multiple_votes_allowed || defaultRankingsAllowed) + .fill('') + .map((_, index) => `${id || 'vote'}_${index + 1}`) + : id || 'vote', + ), ) return (