From 0c1ca11304bc9e3bacdbad4db113cd13e8601a0a Mon Sep 17 00:00:00 2001 From: James Grugett Date: Wed, 15 Jun 2022 17:19:14 -0500 Subject: [PATCH] Don't show unsavedChanges warning if you are submitting new market. --- web/pages/create.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pages/create.tsx b/web/pages/create.tsx index d9fb882e..97f79295 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -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 =