Don't show unsavedChanges warning if you are submitting new market.
This commit is contained in:
parent
781506129c
commit
0c1ca11304
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue
Block a user