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

Function loginToApp

linkedin-clone/src/Login.js:15–30  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

13 const dispatch = useDispatch();
14
15 const loginToApp = (e) => {
16 e.preventDefault();
17
18 auth.signInWithEmailAndPassword(email, password).then(
19 userAuth => {
20 dispatch(login({
21 email: userAuth.user.email,
22 uid: userAuth.user.uid,
23 displayName: userAuth.user.displayName,
24 profilePic: userAuth.user.displayName,
25 }))
26 }
27 )
28 .then((error) => alert(error))
29
30 }
31 const register = () => {
32 if (!name) {
33 return alert('Please enter a full name!');

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected