Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed all issues #243

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@
</head>
<body>
<form>
<!-- TODO: Fix Logo Rendering Issue-->
<img src="/logo.png" />
<img src="logo.svg" />
<span id="success-message" hidden="true">Success!</span>
<span id="error-message" hidden="true">Invalid Credentials</span>
<label for="email">Email</label>
<!-- TODO: Add HTML Email Validation to Email Input -->
<input id="email" type="text" placeholder="Enter your email" />
<input id="email" type="email" placeholder="Enter your email" />
<label for="password">Password</label>
<!-- TODO: Update HTML Password Input to Hide Password Visibility -->
<input id="password" type="text" placeholder="Enter your password" />
<input id="password" type="password" placeholder="Enter your password" />
<button>Submit</button>
</form>
</body>
Expand Down
12 changes: 6 additions & 6 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
2 changes: 1 addition & 1 deletion src/styles.css
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down