Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix #2287

Merged
merged 1 commit into from
Oct 10, 2023
Merged

hotfix #2287

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/KyberDAO/Vote/ProposalItem/OptionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default function OptionButton({
id: number
}) {
const parsedPercent = parseFloat(percent.toFixed(2) || '0')
const hardCodedTitle = HARDCODED_OPTION_TITLE[proposalId][id]
const hardCodedTitle = HARDCODED_OPTION_TITLE[proposalId]?.[id]
return (
<Wrapper onClick={() => !disabled && onOptionClick?.()} disabled={disabled} type={type}>
<div style={{ zIndex: 4, width: '100%' }}>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export default function Participants({ proposalId }: { proposalId?: number }) {
proposalInfo?.vote_stats?.options.reduce((max, o) => (o.vote_count > max.vote_count ? o : max)).option ===
index
const filteredParticipants = participants.filter(p => p.option === index)
const hardCodedTitle = proposalId ? HARDCODED_OPTION_TITLE[proposalId][index] : undefined
const hardCodedTitle = proposalId ? HARDCODED_OPTION_TITLE[proposalId]?.[index] : undefined
return (
<OptionWrapper
key={optionTitle}
Expand Down
Loading