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..a8008ba 100644 --- a/src/script.js +++ b/src/script.js @@ -30,4 +30,12 @@ addEventListener("submit", (event) => { 2. If they are, call renderSuccess() 3. If they are not, call renderError() */ + const user = usersTable.find( + (u) => u.username === email && u.password === password + ); + if (user) { + renderSuccess(); + } else { + renderError(); + } }); diff --git a/src/styles.css b/src/styles.css index 25969e5..22a4fac 100644 --- a/src/styles.css +++ b/src/styles.css @@ -2,6 +2,7 @@ body { height: 100vh; display: flex; /* TODO: Adjust CSS so that form is centered on page */ + justify-content: center; align-items: center; }