Skip to content

Commit cadc4f9

Browse files
committed
fix(web): improve voting history wording
1 parent 363a585 commit cadc4f9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

web/src/hooks/queries/useVotingHistory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const votingHistoryQuery = graphql(`
3636
export const useVotingHistory = (disputeID?: string) => {
3737
const isEnabled = disputeID !== undefined;
3838

39-
return useQuery({
39+
return useQuery<VotingHistoryQuery>({
4040
queryKey: ["refetchOnBlock", `VotingHistory${disputeID}`],
4141
enabled: isEnabled,
4242
queryFn: async () => await graphqlQueryFnHelper(votingHistoryQuery, { disputeID }),

web/src/pages/Cases/CaseDetails/Voting/VotingHistory.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ const VotingHistory: React.FC<{ arbitrable?: `0x${string}` }> = ({ arbitrable })
112112
<p>
113113
{localRounds.at(currentTab)?.totalVoted === rounds.at(currentTab)?.nbVotes
114114
? "All jurors voted"
115-
: localRounds.at(currentTab)?.totalVoted + " jurors voted out of " + rounds.at(currentTab)?.nbVotes}
115+
: localRounds.at(currentTab)?.totalVoted.toString() +
116+
` vote${localRounds.at(currentTab)?.totalVoted.toString() === "1" ? "" : "s"} casted out of ` +
117+
rounds.at(currentTab)?.nbVotes}
116118
</p>
117119
</StyledBox>
118120
<StyledAccordion

0 commit comments

Comments
 (0)