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

Function handleUserData

apps/OpenSign/src/pages/GuestLogin.jsx:221–248  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

219
220
221 const handleUserData = async (e) => {
222 e.preventDefault();
223 if (!emailRegex.test(contact.email?.toLowerCase()?.replace(/\s/g, ""))) {
224 alert(t("valid-email-alert"));
225 } else {
226 const params = { ...contact, docId: documentId };
227 try {
228 setLoading(true);
229 const linkContactRes = await Parse.Cloud.run(
230 "linkcontacttodoc",
231 params
232 );
233 setContactId(linkContactRes.contactId);
234 const IsEnableOTP = await navigateToDoc(
235 documentId,
236 linkContactRes.contactId
237 );
238 if (!IsEnableOTP) {
239 setEnterOtp(true);
240 await SendOtp();
241 }
242 } catch (err) {
243 setLoading(false);
244 alert(t("something-went-wrong-mssg"));
245 console.log("Err in link ext contact", err);
246 }
247 }
248 };
249
250 const handleInputChange = (e) => {
251 if (e.target.name === "email") {

Callers

nothing calls this directly

Calls 2

navigateToDocFunction · 0.85
SendOtpFunction · 0.85

Tested by

no test coverage detected