create page: disable form elements after submitting

This commit is contained in:
mantikoros 2022-01-05 21:05:46 -06:00
parent 3d780be70a
commit 95b28bd536

View File

@ -105,6 +105,7 @@ export default function NewContract() {
type="text" type="text"
placeholder="e.g. Will the FDA will approve Paxlovid before Jun 2nd, 2022?" placeholder="e.g. Will the FDA will approve Paxlovid before Jun 2nd, 2022?"
className="input input-bordered" className="input input-bordered"
disabled={isSubmitting}
value={question} value={question}
onChange={(e) => setQuestion(e.target.value || '')} onChange={(e) => setQuestion(e.target.value || '')}
/> />
@ -121,6 +122,7 @@ export default function NewContract() {
type="number" type="number"
value={initialProb} value={initialProb}
className="input input-bordered input-md" className="input input-bordered input-md"
disabled={isSubmitting}
min={1} min={1}
max={99} max={99}
onChange={(e) => onChange={(e) =>
@ -141,6 +143,7 @@ export default function NewContract() {
className="textarea w-full h-24 textarea-bordered" className="textarea w-full h-24 textarea-bordered"
placeholder={descriptionPlaceholder} placeholder={descriptionPlaceholder}
value={description} value={description}
disabled={isSubmitting}
onClick={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}
onChange={(e) => setDescription(e.target.value || '')} onChange={(e) => setDescription(e.target.value || '')}
/> />