diff --git a/apps/web/pages/documents/[id]/recipients.tsx b/apps/web/pages/documents/[id]/recipients.tsx
index ed8e50f97..631d15c9d 100644
--- a/apps/web/pages/documents/[id]/recipients.tsx
+++ b/apps/web/pages/documents/[id]/recipients.tsx
@@ -15,21 +15,120 @@ import {
TrashIcon,
UserPlusIcon,
} from "@heroicons/react/20/solid";
-import { classNames } from "@documenso/lib";
+import { classNames, NEXT_PUBLIC_WEBAPP_URL } from "@documenso/lib";
import {
+ PaperAirplaneIcon,
UserGroupIcon,
UserIcon,
UsersIcon,
} from "@heroicons/react/24/outline";
+import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/20/solid";
+import { getUserFromToken } from "@documenso/lib/server";
-const RecipientsPage: NextPageWithLayout = () => {
+const RecipientsPage: NextPageWithLayout = (props: any) => {
+ const title: string =
+ `"` + props?.document?.title + `"` + "Recipients | Documenso";
return (
<>
- Documenttitle - Recipients | Documenso
+ {title}
- -todo add signers ui -todo add breadcrumps -todo who will sign this
- dropdown
+ {/* -todo add signers ui -todo add breadcrumps -todo who will sign this
+ dropdown */}
+
+
+
+
+
+ {props.document.title}
+
+
+
+
+
+
+
+
>
);
};
@@ -39,9 +138,23 @@ RecipientsPage.getLayout = function getLayout(page: ReactElement) {
};
export async function getServerSideProps(context: any) {
- // todo get current document
+ const user = await getUserFromToken(context.req, context.res);
+ if (!user) return;
+
+ const { id: documentId } = context.query;
+ const document = await prisma.document.findFirstOrThrow({
+ where: {
+ id: +documentId,
+ },
+ include: {
+ Recipient: true,
+ },
+ });
+
return {
- props: {},
+ props: {
+ document: document,
+ },
};
}