()
| 30 | }, []); |
| 31 | |
| 32 | const initialsetup = async () => { |
| 33 | const search = window.location.search.split("?")[1]; |
| 34 | if (search) { |
| 35 | const urlParams = new URLSearchParams(search); |
| 36 | const docId = urlParams.get("docid"); |
| 37 | const docUrl = urlParams.get("docurl"); |
| 38 | const certificate = urlParams.get("certificate"); |
| 39 | const completed = urlParams?.get("completed") || false; |
| 40 | const details = { |
| 41 | objectId: docId, |
| 42 | SignedUrl: docUrl, |
| 43 | CertificateUrl: certificate, |
| 44 | IsCompleted: completed, |
| 45 | }; |
| 46 | setPdfDetails([details]); |
| 47 | const base64Pdf = await getBase64FromUrl(docUrl); |
| 48 | if (base64Pdf) { |
| 49 | setPdfBase64Url(base64Pdf); |
| 50 | } |
| 51 | } |
| 52 | }; |
| 53 | |
| 54 | const handleDownload = () => { |
| 55 | if ( |
no test coverage detected