From 53c4fb0f89a5cec82ad960107d820444de518096 Mon Sep 17 00:00:00 2001 From: Musselman Date: Wed, 29 Nov 2023 18:14:09 -0600 Subject: [PATCH] Switch submit order --- static/build/index.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/static/build/index.js b/static/build/index.js index 8931a1d..6593488 100644 --- a/static/build/index.js +++ b/static/build/index.js @@ -79,12 +79,6 @@ function submitSignup() { submitBtn.innerHTML = ''; submitBtn.appendChild(spinner); - // Enable the button and remove the spinner after 5 seconds - setTimeout(function () { - submitBtn.disabled = false; - submitBtn.innerHTML = 'Sign Up'; - }, 5000); - sleep(5000).then(() => { submitBtn.disabled = false; }); // Get the values of the signup form fields const name = document.getElementById("name").value; @@ -117,6 +111,16 @@ function submitSignup() { .catch(error => { console.error(error); }); + + + // Enable the button and remove the spinner after 5 seconds + setTimeout(function () { + submitBtn.disabled = false; + submitBtn.innerHTML = 'Sign Up'; + }, 5000); + sleep(5000).then(() => { submitBtn.disabled = false; }); + + }