@@ -36,7 +36,7 @@ export const signUpController = (signupForm) => {
3636 errors . push ( 'The email format is incorrect.' )
3737 }
3838
39- // check that the passwords are the sameH
39+ // check that the passwords are the same
4040 if ( password !== passwordConfirm ) {
4141 errors . push ( 'Passwords are not the same.' )
4242 }
@@ -45,8 +45,8 @@ export const signUpController = (signupForm) => {
4545 handleCreateUser ( name , email , password , signupForm )
4646 } else {
4747 errors . forEach ( error => {
48- const event = new CustomEvent ( "sigup -error" , {
49- detail : error // <-- "error" are actually theh
48+ const event = new CustomEvent ( "signup -error" , {
49+ detail : error // <-- "error" is actually the descriptions
5050 } ) ;
5151 signupForm . dispatchEvent ( event )
5252 } )
@@ -58,7 +58,7 @@ export const signUpController = (signupForm) => {
5858
5959 /* Insert User to API REST VVVVVVVVVVVVVVVVVVV */
6060 await createUser ( name , email , password ) ;
61- const event = new CustomEvent ( "sigup -ok" , {
61+ const event = new CustomEvent ( "signup -ok" , {
6262 detail : {
6363 message : 'You have successfully registered.' ,
6464 type : 'success'
@@ -73,7 +73,7 @@ export const signUpController = (signupForm) => {
7373
7474 } catch ( error ) {
7575
76- const event = new CustomEvent ( "sigup -error" , {
76+ const event = new CustomEvent ( "signup -error" , {
7777 detail : error . message
7878 } ) ;
7979
0 commit comments