MCPcopy Create free account
hub / github.com/codemistic/Web-Development / registerHandler

Function registerHandler

Yet Another LinkedIn Clone/Login.js:33–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 };
32
33 const registerHandler = async () => {
34 if (!name) {
35 return alert("Please enter a full name!");
36 }
37
38 try {
39 const userAuth = await auth.createUserWithEmailAndPassword(
40 email,
41 password
42 );
43
44 await userAuth.user.updateProfile({
45 displayName: name,
46 photoUrl: profilePic,
47 });
48
49 dispatch(
50 login({
51 email: userAuth.user.email,
52 uid: userAuth.user.uid,
53 displayName: name,
54 photoUrl: profilePic,
55 })
56 );
57 } catch (error) {
58 console.log(error);
59 alert(error);
60 }
61 };
62
63 return (
64 <div className="login">

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected