diff --git a/src/index.html b/src/index.html index e7c4417..15541d0 100644 --- a/src/index.html +++ b/src/index.html @@ -8,16 +8,16 @@
diff --git a/src/script.js b/src/script.js index 4e3be16..f92482e 100644 --- a/src/script.js +++ b/src/script.js @@ -25,9 +25,16 @@ addEventListener("submit", (event) => { console.log(`email submitted: ${email}`); console.log(`password submitted: ${password}`); /* - TODO: + Done 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.some((user) => user.username === email && user.password === password)) { + renderSuccess(); + } + else { + renderError(); + } }); diff --git a/src/styles.css b/src/styles.css index 25969e5..4439fb9 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,6 +1,7 @@ body { height: 100vh; display: flex; + justify-content: center; /* TODO: Adjust CSS so that form is centered on page */ align-items: center; }