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:
|
// get days from today until the end of this year:
|
||||||
const daysLeftInTheYear = dayjs().endOf('year').diff(dayjs(), 'day')
|
const daysLeftInTheYear = dayjs().endOf('year').diff(dayjs(), 'day')
|
||||||
|
|
||||||
const hasUnsavedChanges = Boolean(question || description)
|
const hasUnsavedChanges = !isSubmitting && Boolean(question || description)
|
||||||
useWarnUnsavedChanges(hasUnsavedChanges)
|
useWarnUnsavedChanges(hasUnsavedChanges)
|
||||||
|
|
||||||
const isValid =
|
const isValid =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user