Initialize close date to 1 week from today

This commit is contained in:
Austin Chen 2022-01-20 11:04:12 -05:00
parent 2760b62b7c
commit dd25c35724

View File

@ -71,7 +71,9 @@ export function NewContract(props: { question: string }) {
}, [creator])
const [anteError, setAnteError] = useState<string | undefined>()
const [closeDate, setCloseDate] = useState('')
// By default, close the market a week from today
const weekFromToday = dayjs().add(7, 'day').format('YYYY-MM-DD')
const [closeDate, setCloseDate] = useState(weekFromToday)
const [isSubmitting, setIsSubmitting] = useState(false)