fix new scratch form aborting submit by reloading

The default behavior of <form> when there is a <button> inside (through AsyncButon) is for the form to be submitted, and as we provided no override it effectively just refreshed the page. This aborts the actual new scratch creation request!
This commit is contained in:
Alex Bates
2023-01-04 12:21:20 +00:00
parent 4cf3e416e5
commit c33a3af4f5

View File

@@ -166,7 +166,7 @@ export default function NewScratchForm({ serverCompilers }: {
const compilersTranslation = useTranslation("compilers")
return <form>
return <div>
<div>
<p className={styles.label}>
Platform
@@ -272,5 +272,5 @@ export default function NewScratchForm({ serverCompilers }: {
For more information, see our <Link href="/privacy">privacy policy</Link>.
</p>
</div>
</form>
</div>
}