Refactor form submission handling for sign up

- Disable submit button and display spinner during form submission to
prevent multiple clicks
- Obtain form field values and send signup request as form data for
processing on the server
This commit is contained in:
James Musselman 2023-11-29 18:59:24 -06:00
parent 93532e65ca
commit ab2682fd3c

View file

@ -104,8 +104,8 @@ function submitSignup() {
throw new Error("Signup request failed"); throw new Error("Signup request failed");
} }
}) })
.then(data => { .then(() => {
console.log(data); window.location.href = "/welcome";
}) })
.catch(error => { .catch(error => {
console.error(error); console.error(error);