From 93a149d637c010736e2d46e852518235ecf61ba6 Mon Sep 17 00:00:00 2001 From: Mythie Date: Wed, 10 Apr 2024 22:10:20 +0700 Subject: [PATCH] fix: handle older cert data --- .../%5F%5Fhtmltopdf/certificate/page.tsx | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx b/apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx index cbdaa451d..d096d1a84 100644 --- a/apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx +++ b/apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx @@ -207,14 +207,16 @@ export default async function SigningCertificate({ searchParams }: SigningCertif

IP Address:{' '} - {logs.DOCUMENT_RECIPIENT_COMPLETED[0].ipAddress} + {logs.DOCUMENT_RECIPIENT_COMPLETED[0]?.ipAddress ?? 'Unknown'}

Device:{' '} - {getDevice(logs.DOCUMENT_RECIPIENT_COMPLETED[0].userAgent)} + {getDevice( + logs.DOCUMENT_RECIPIENT_COMPLETED[0]?.userAgent ?? 'Unknown', + )}

@@ -229,7 +231,7 @@ export default async function SigningCertificate({ searchParams }: SigningCertif Sent:{' '} @@ -238,20 +240,28 @@ export default async function SigningCertificate({ searchParams }: SigningCertif

Viewed:{' '} - + {logs.DOCUMENT_OPENED[0] ? ( + + ) : ( + 'Unknown' + )}

Signed:{' '} - + {logs.DOCUMENT_RECIPIENT_COMPLETED[0] ? ( + + ) : ( + 'Unknown' + )}