From 5b779c5992945e436ecf6af3da622ffc5d38a55c Mon Sep 17 00:00:00 2001 From: Ludwig Date: Fri, 12 Jan 2024 23:53:41 -0300 Subject: [PATCH] Fix issues as per TODO comments --- src/index.html | 6 +++--- src/script.js | 9 +++++++++ src/styles.css | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) 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..676a119 100644 --- a/src/script.js +++ b/src/script.js @@ -30,4 +30,13 @@ addEventListener("submit", (event) => { 2. If they are, call renderSuccess() 3. If they are not, call renderError() */ + if(usersTable.find((element) => element.username == email)) { + if(usersTable.find((element) => element.password == password)){ + renderSuccess() + } else { + renderError() + } + } else { + renderError() + } }); 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 {