Don't show unsavedChanges warning if you are submitting new market.

This commit is contained in:
James Grugett 2022-06-15 17:19:14 -05:00
parent 781506129c
commit 0c1ca11304

View File

@ -112,7 +112,7 @@ export function NewContract(props: { question: string }) {
// get days from today until the end of this year:
const daysLeftInTheYear = dayjs().endOf('year').diff(dayjs(), 'day')
const hasUnsavedChanges = Boolean(question || description)
const hasUnsavedChanges = !isSubmitting && Boolean(question || description)
useWarnUnsavedChanges(hasUnsavedChanges)
const isValid =