MCPcopy Create free account
hub / github.com/OpenSignLabs/OpenSign / setLocalVar

Function setLocalVar

apps/OpenSign/src/pages/Login.jsx:59–68  ·  view source on GitHub ↗
(user)

Source from the content-addressed store, hash-verified

57
58
59 const setLocalVar = (user) => {
60 localStorage.setItem("accesstoken", user.sessionToken);
61 localStorage.setItem("UserInformation", JSON.stringify(user));
62 localStorage.setItem("userEmail", user.email);
63 if (user.ProfilePic) {
64 localStorage.setItem("profileImg", user.ProfilePic);
65 } else {
66 localStorage.setItem("profileImg", "");
67 }
68 };
69
70 const showToast = (type, msg) => {
71 setState({ ...state, loading: false, alertType: type, alertMsg: msg });

Callers 3

handleLoginFunction · 0.85
thirdpartyLoginfnFunction · 0.85
GetLoginDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected