From 4bc74c1b664154ba993ed21c7563f6f559abcfae Mon Sep 17 00:00:00 2001 From: motechFR Date: Tue, 30 Jan 2024 19:27:14 +0200 Subject: [PATCH] Fix initial state so CI works (#3549) --- .../EvaluationSettingsSidebar/components/VoteSettings.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/proposals/ProposalPage/components/EvaluationSettingsSidebar/components/VoteSettings.tsx b/components/proposals/ProposalPage/components/EvaluationSettingsSidebar/components/VoteSettings.tsx index 3f24915b89..9b095e489d 100644 --- a/components/proposals/ProposalPage/components/EvaluationSettingsSidebar/components/VoteSettings.tsx +++ b/components/proposals/ProposalPage/components/EvaluationSettingsSidebar/components/VoteSettings.tsx @@ -37,8 +37,9 @@ const StyledVoteSettings = styled.div` export function VoteSettings({ readOnly, value, onChange }: CreateVoteModalProps) { const [passThreshold, setPassThreshold] = useState(value?.threshold || 50); + // Default values for approval type vote const [voteType, setVoteType] = useState(value?.type ?? VoteType.Approval); - const [options, setOptions] = useState(value?.options ?? []); + const [options, setOptions] = useState(value?.options ?? ['Yes', 'No', 'Abstain']); const [maxChoices, setMaxChoices] = useState(value?.maxChoices ?? 1); const [durationDays, setDurationDays] = useState(value?.durationDays ?? 5); const [publishToSnapshot, setPublishToSnapshot] = useState(value?.publishToSnapshot ?? false);