generated from tod/odin-webpack-template
UI: Add timeout for success alert to give time for confetti
This commit is contained in:
parent
ec621d42b3
commit
12eb673c90
|
@ -41,9 +41,11 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
const formData = new FormData(form);
|
const formData = new FormData(form);
|
||||||
const formDataValue = formData.values();
|
const formDataValue = formData.values();
|
||||||
const [email, country, zip] = Array(5).fill(formDataValue.next().value);
|
const [email, country, zip] = Array(5).fill(formDataValue.next().value);
|
||||||
|
setTimeout(() => {
|
||||||
alert(
|
alert(
|
||||||
`Success!\nEmail: ${email}\nCountry: ${country}\nZIP: ${zip}\nPassword: [redacted]`,
|
`Success!\nEmail: ${email}\nCountry: ${country}\nZIP: ${zip}\nPassword: [redacted]`,
|
||||||
);
|
);
|
||||||
|
}, 600);
|
||||||
} else {
|
} else {
|
||||||
alert("Hold up, one or more fields are invalid! Try again");
|
alert("Hold up, one or more fields are invalid! Try again");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue