From 533ace84f80eced800575ccb225a15fc335c758e Mon Sep 17 00:00:00 2001 From: XiaoYhun Date: Tue, 10 Oct 2023 16:04:18 +0700 Subject: [PATCH] hotfix --- src/pages/KyberDAO/Vote/ProposalItem/OptionButton.tsx | 2 +- src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/KyberDAO/Vote/ProposalItem/OptionButton.tsx b/src/pages/KyberDAO/Vote/ProposalItem/OptionButton.tsx index b2bd476f57..6d2959f19b 100644 --- a/src/pages/KyberDAO/Vote/ProposalItem/OptionButton.tsx +++ b/src/pages/KyberDAO/Vote/ProposalItem/OptionButton.tsx @@ -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 ( !disabled && onOptionClick?.()} disabled={disabled} type={type}>
diff --git a/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx b/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx index 1715ab8f7d..805fd21f83 100644 --- a/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx +++ b/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx @@ -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 (