From 30eac1bd96cc9bf86a4f03fc89b97a519f5e4e59 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Thu, 9 Jun 2022 14:26:46 -0600 Subject: [PATCH] Initial probs = 50 --- web/pages/create.tsx | 53 +------------------------------------------- 1 file changed, 1 insertion(+), 52 deletions(-) diff --git a/web/pages/create.tsx b/web/pages/create.tsx index c5f01b47..259a5375 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -65,7 +65,7 @@ export function NewContract(props: { question: string; tag?: string }) { }, [creator]) const [outcomeType, setOutcomeType] = useState('BINARY') - const [initialProb, setInitialProb] = useState(50) + const [initialProb] = useState(50) const [minString, setMinString] = useState('') const [maxString, setMaxString] = useState('') const [description, setDescription] = useState('') @@ -90,7 +90,6 @@ export function NewContract(props: { question: string; tag?: string }) { const weekFromToday = dayjs().add(7, 'day').format('YYYY-MM-DD') const [closeDate, setCloseDate] = useState(weekFromToday) const [closeHoursMinutes, setCloseHoursMinutes] = useState('23:59') - const [probErrorText, setProbErrorText] = useState('') const [marketInfoText, setMarketInfoText] = useState('') const [isSubmitting, setIsSubmitting] = useState(false) @@ -193,56 +192,6 @@ export function NewContract(props: { question: string; tag?: string }) { - {outcomeType === 'BINARY' && ( -
- - How likely is it to happen? - - - { - setProbErrorText('') - setInitialProb(option as number) - }} - choicesMap={{ - Unlikely: 25, - 'Not Sure': 50, - Likely: 75, - }} - isSubmitting={isSubmitting} - className={'col-span-4 sm:col-span-3'} - > - - { - // show error if prob is less than 5 or greater than 95: - const prob = parseInt(e.target.value) - setInitialProb(prob) - if (prob < 5 || prob > 95) - setProbErrorText('Probability must be between 5% and 95%') - else setProbErrorText('') - }} - /> - % - - - - {probErrorText && ( -
{probErrorText}
- )} - -
- )} - {outcomeType === 'NUMERIC' && (