From c49d379f13ec226ccb7274c14b3421de9a2866e2 Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Wed, 4 Mar 2026 20:58:29 +0100 Subject: [PATCH] refactor: use shared POLL_VOTES constant for vote badge styling Replace inline badge styles in VoteEvent with the shared POLL_VOTES constant to keep vote styling consistent across the app. Co-Authored-By: Claude Opus 4.6 --- components/TransactionsList/index.tsx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/components/TransactionsList/index.tsx b/components/TransactionsList/index.tsx index b1b10d78..997945d6 100644 --- a/components/TransactionsList/index.tsx +++ b/components/TransactionsList/index.tsx @@ -2,7 +2,7 @@ import EthAddressBadge from "@components/EthAddressBadge"; import Table from "@components/Table"; import TransactionBadge from "@components/TransactionBadge"; import { parseProposalText } from "@lib/api/treasury"; -import { VOTING_SUPPORT_MAP } from "@lib/api/types/votes"; +import { POLL_VOTES, VOTING_SUPPORT_MAP } from "@lib/api/types/votes"; import dayjs from "@lib/dayjs"; import { Badge, Box, Flex, Link as A, Text } from "@livepeer/design-system"; import { EventsQueryResult, TreasuryProposal } from "apollo"; @@ -344,24 +344,19 @@ const TransactionsList = ({ event?.param ?? "unknown" }, has been updated`} ); - case "VoteEvent": + case "VoteEvent": { + const vote = POLL_VOTES[event?.choiceID]; return ( {`Voted `} - - {+event?.choiceID === 0 ? '"For"' : '"Against"'} + + {`"${vote.text}"`} {` on a proposal`} {renderEmoji("👩‍⚖️")} ); + } case "PollCreatedEvent": return (