From 86baf30f3fc4d6b1a1b9b142e232bd22980b709b Mon Sep 17 00:00:00 2001 From: nhd98z Date: Thu, 12 Oct 2023 16:09:33 +0700 Subject: [PATCH] Fix option title --- src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx b/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx index 805fd21f83..791207488b 100644 --- a/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx +++ b/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx @@ -166,7 +166,10 @@ export default function Participants({ proposalId }: { proposalId?: number }) { } }) }, [proposalInfo]) - const options = proposalInfo?.options + const options = proposalInfo?.options.map((option, index) => { + if (!proposalId || !HARDCODED_OPTION_TITLE[proposalId][index]) return option + return HARDCODED_OPTION_TITLE[proposalId][index] + }) // flag to reduce fontsize when contents are too long const isLongText = useMemo(() => {