From 95b28bd536ae4a7f22d01392db1f36544c8aae9b Mon Sep 17 00:00:00 2001 From: mantikoros Date: Wed, 5 Jan 2022 21:05:46 -0600 Subject: [PATCH] create page: disable form elements after submitting --- web/pages/create.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/pages/create.tsx b/web/pages/create.tsx index ab76e667..467cb407 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -105,6 +105,7 @@ export default function NewContract() { type="text" placeholder="e.g. Will the FDA will approve Paxlovid before Jun 2nd, 2022?" className="input input-bordered" + disabled={isSubmitting} value={question} onChange={(e) => setQuestion(e.target.value || '')} /> @@ -121,6 +122,7 @@ export default function NewContract() { type="number" value={initialProb} className="input input-bordered input-md" + disabled={isSubmitting} min={1} max={99} onChange={(e) => @@ -141,6 +143,7 @@ export default function NewContract() { className="textarea w-full h-24 textarea-bordered" placeholder={descriptionPlaceholder} value={description} + disabled={isSubmitting} onClick={(e) => e.stopPropagation()} onChange={(e) => setDescription(e.target.value || '')} />