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:
parent
93532e65ca
commit
ab2682fd3c
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue