diff --git a/src/index.html b/src/index.html index e7c4417..672e976 100644 --- a/src/index.html +++ b/src/index.html @@ -9,15 +9,15 @@
- + - + - +
diff --git a/src/script.js b/src/script.js index 4e3be16..182857a 100644 --- a/src/script.js +++ b/src/script.js @@ -24,6 +24,11 @@ addEventListener("submit", (event) => { console.log(`email submitted: ${email}`); console.log(`password submitted: ${password}`); + let counter = 0; + usersTable.forEach((user) => { + user.username === email && user.password === password ? counter++ : counter += 0; + }); + counter > 0 ? renderSuccess() : renderError(); /* TODO: 1. Check if the email and password are valid (using the usersTable) diff --git a/src/styles.css b/src/styles.css index 25969e5..6d006f0 100644 --- a/src/styles.css +++ b/src/styles.css @@ -3,6 +3,7 @@ body { display: flex; /* TODO: Adjust CSS so that form is centered on page */ align-items: center; + justify-content: center; } form {