File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 </ head >
99 < body >
1010 < form >
11- <!-- TODO: Fix Logo Rendering Issue-->
12- < img src ="/ logo.png " />
11+ <!-- Done TODO: Fix Logo Rendering Issue-->
12+ < img src ="logo.svg " />
1313 < span id ="success-message " hidden ="true "> Success!</ span >
1414 < span id ="error-message " hidden ="true "> Invalid Credentials</ span >
1515 < label for ="email "> Email</ label >
16- <!-- TODO: Add HTML Email Validation to Email Input -->
17- < input id ="email " type ="text " placeholder ="Enter your email " />
16+ <!-- Done TODO: Add HTML Email Validation to Email Input -->
17+ < input id ="email " type ="email " placeholder ="Enter your email " />
1818 < label for ="password "> Password</ label >
19- <!-- TODO: Update HTML Password Input to Hide Password Visibility -->
20- < input id ="password " type ="text " placeholder ="Enter your password " />
19+ <!-- Done TODO: Update HTML Password Input to Hide Password Visibility -->
20+ < input id ="password " type ="password " placeholder ="Enter your password " />
2121 < button > Submit</ button >
2222 </ form >
2323 </ body >
Original file line number Diff line number Diff line change @@ -25,9 +25,16 @@ addEventListener("submit", (event) => {
2525 console . log ( `email submitted: ${ email } ` ) ;
2626 console . log ( `password submitted: ${ password } ` ) ;
2727 /*
28- TODO:
28+ Done TODO:
2929 1. Check if the email and password are valid (using the usersTable)
3030 2. If they are, call renderSuccess()
3131 3. If they are not, call renderError()
3232 */
33+
34+ if ( usersTable . some ( ( user ) => user . username === email && user . password === password ) ) {
35+ renderSuccess ( ) ;
36+ }
37+ else {
38+ renderError ( ) ;
39+ }
3340} ) ;
Original file line number Diff line number Diff line change 11body {
22 height : 100vh ;
33 display : flex;
4+ justify-content : center;
45 /* TODO: Adjust CSS so that form is centered on page */
56 align-items : center;
67}
You can’t perform that action at this time.
0 commit comments