From c107608aeb50844a08cecd05b3a3587b817460c0 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan Date: Wed, 6 Sep 2023 07:37:03 +0000 Subject: [PATCH] chore: remove undefined check --- apps/web/src/app/(signing)/sign/[token]/page.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web/src/app/(signing)/sign/[token]/page.tsx b/apps/web/src/app/(signing)/sign/[token]/page.tsx index 61ac8be82..23bd6a7d0 100644 --- a/apps/web/src/app/(signing)/sign/[token]/page.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/page.tsx @@ -45,6 +45,10 @@ export default async function SigningPage({ params: { token } }: SigningPageProp return notFound(); } + if (document.status === 'COMPLETED') { + redirect(`/sign/${token}/complete`); + } + const user = await getServerComponentSession(); const documentDataUrl = await getFile(documentData)