import prisma from "@documenso/prisma"; import Head from "next/head"; import { NextPageWithLayout } from "../../_app"; import { ReadStatus } from "@prisma/client"; import { CheckBadgeIcon } from "@heroicons/react/24/outline"; import { Button } from "@documenso/ui"; import Link from "next/link"; const SignPage: NextPageWithLayout = (props: any) => { return ( <>
You signed "{props.document.title}"
You will be notfied when all recipients have signed.
Want to send slick signing links like this one?{" "} Create your own Account
> ); }; export async function getServerSideProps(context: any) { const recipientToken: string = context.query["token"]; const recipient = await prisma.recipient.findFirstOrThrow({ where: { token: recipientToken, }, include: { Document: true, }, }); const fields = await prisma.field.findMany({ where: { documentId: recipient.Document.id, }, include: { Recipient: true, }, }); return { props: { document: recipient.Document, fields: fields, }, }; } export default SignPage;