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

Function loginHandler

Yet Another LinkedIn Clone/Login.js:15–31  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

13 const dispatch = useDispatch();
14
15 const loginHandler = async (e) => {
16 e.preventDefault();
17 try {
18 const userAuth = await auth.signInWithEmailAndPassword(email, password);
19
20 dispatch(
21 login({
22 email: userAuth.user.email,
23 uid: userAuth.user.uid,
24 displayName: userAuth.user.displayName,
25 photoUrl: userAuth.user.photoURL,
26 })
27 );
28 } catch (error) {
29 alert(error);
30 }
31 };
32
33 const registerHandler = async () => {
34 if (!name) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected