refactor: use shared POLL_VOTES constant for vote badge styling#580
Merged
refactor: use shared POLL_VOTES constant for vote badge styling#580
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the Transactions list “VoteEvent” badge rendering to use the shared POLL_VOTES vote metadata (text + styles), aligning poll vote badge styling with the rest of the app (notably the Voting page).
Changes:
- Import and use
POLL_VOTESfor poll vote badge text/style instead of inline badge colors. - Replace inline ternary styling with a single
POLL_VOTESlookup for “For” vs “Against”.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 <noreply@anthropic.com>
cf6fd9c to
c49d379
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Refactors the "Against" vote badge in the transactions list to use the shared
POLL_VOTESconstant instead of inline styles. This ensures consistent vote badge styling across the app (matching the Voting page) and fixes the "Against" badge appearance.Type of Change
Related Issue(s)
N/A
Changes Made
backgroundColor/colorstyling for vote badges inTransactionsListwith the sharedPOLL_VOTESconstant from@lib/api/types/votesPOLL_VOTES[].styleandPOLL_VOTES[].textso "For" and "Against" badges render consistently with other vote displaysTesting
How to test
Impact / Risk
Risk level: Low
Impacted areas: UI
User impact: "Against" vote badges in the transactions list now render with consistent styling matching the rest of the app.
Rollback plan: Revert PR
Screenshots / Recordings
Before
After
Additional Notes
🤖 Generated with Claude Code