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

Function navigateToDoc

apps/OpenSign/src/pages/GuestLogin.jsx:47–69  ·  view source on GitHub ↗
(docId, contactId)

Source from the content-addressed store, hash-verified

45 const [isOptionalDetails, setIsOptionalDetails] = useState(false);
46
47 const navigateToDoc = async (docId, contactId) => {
48 try {
49 const docDetails = await Parse.Cloud.run("getDocument", {
50 docId: docId
51 });
52 if (!docDetails.error) {
53 if (sendmail === "false") {
54 navigate(
55 `/load/recipientSignPdf/${docId}/${contactId}?sendmail=${sendmail}`
56 );
57 } else {
58 navigate(`/load/recipientSignPdf/${docId}/${contactId}`);
59 }
60 return true;
61 } else {
62 setIsLoading({ isLoad: false });
63 return false;
64 }
65 } catch (err) {
66 console.log("err while getting doc", err);
67 return false;
68 }
69 };
70
71 useEffect(() => {
72 handleServerUrl();

Callers 2

handleServerUrlFunction · 0.85
handleUserDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected