Skip to content

Commit

Permalink
hotfix (#2287)
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoYhun authored Oct 10, 2023
1 parent 41b759b commit 7db1c6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 7db1c6d

Please sign in to comment.