diff --git a/apps/web/src/app/(signing)/sign/[token]/page.tsx b/apps/web/src/app/(signing)/sign/[token]/page.tsx index 35621068a..a55687196 100644 --- a/apps/web/src/app/(signing)/sign/[token]/page.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/page.tsx @@ -1,4 +1,4 @@ -import { notFound } from 'next/navigation'; +import { notFound, redirect } from 'next/navigation'; import { match } from 'ts-pattern'; @@ -44,6 +44,10 @@ export default async function SigningPage({ params: { token } }: SigningPageProp return notFound(); } + if (document?.status === 'COMPLETED') { + redirect(`/sign/${token}/complete`); + } + const user = await getServerComponentSession(); const documentUrl = `data:application/pdf;base64,${document.document}`;