UI: Add timeout for success alert to give time for confetti

This commit is contained in:
NetMan 2024-02-24 18:09:06 +01:00
parent ec621d42b3
commit 12eb673c90
1 changed files with 5 additions and 3 deletions

View File

@ -41,9 +41,11 @@ document.addEventListener("DOMContentLoaded", () => {
const formData = new FormData(form);
const formDataValue = formData.values();
const [email, country, zip] = Array(5).fill(formDataValue.next().value);
alert(
`Success!\nEmail: ${email}\nCountry: ${country}\nZIP: ${zip}\nPassword: [redacted]`,
);
setTimeout(() => {
alert(
`Success!\nEmail: ${email}\nCountry: ${country}\nZIP: ${zip}\nPassword: [redacted]`,
);
}, 600);
} else {
alert("Hold up, one or more fields are invalid! Try again");
}