From 94c9c39b455c90dc8fc805645e8abd30b5e34cef Mon Sep 17 00:00:00 2001 From: Sergio Jose dos Santos Junior Date: Mon, 27 Nov 2023 10:27:32 -0300 Subject: [PATCH] Fixed all issues --- src/index.html | 9 +++------ src/script.js | 12 ++++++------ src/styles.css | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/index.html b/src/index.html index e7c4417..5334525 100644 --- a/src/index.html +++ b/src/index.html @@ -8,16 +8,13 @@
- - + - - + - - +
diff --git a/src/script.js b/src/script.js index 4e3be16..fb35fd1 100644 --- a/src/script.js +++ b/src/script.js @@ -24,10 +24,10 @@ addEventListener("submit", (event) => { console.log(`email submitted: ${email}`); console.log(`password submitted: ${password}`); - /* - TODO: - 1. Check if the email and password are valid (using the usersTable) - 2. If they are, call renderSuccess() - 3. If they are not, call renderError() - */ + + if (usersTable.find(user => user.username === email && user.password === password)) { + renderSuccess(); + } else { + renderError(); + } }); diff --git a/src/styles.css b/src/styles.css index 25969e5..c2855b8 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,8 +1,8 @@ body { height: 100vh; display: flex; - /* TODO: Adjust CSS so that form is centered on page */ align-items: center; + justify-content: center; } form {