From 2176511ef766a2a3064386829aea325900a01af6 Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Tue, 21 Feb 2023 11:19:31 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A7=B9=F0=9F=9A=A7DOC-97=20DOC-19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/components/editor/editable-field.tsx | 7 +++---- apps/web/components/editor/pdf-editor.tsx | 1 - apps/web/components/editor/pdf-viewer.jsx | 1 + apps/web/pages/documents.tsx | 20 ++++++++----------- apps/web/pages/documents/[id]/index.tsx | 3 +-- apps/web/pages/documents/[id]/recipients.tsx | 4 ++-- packages/lib/query/getDocument.ts | 2 +- 7 files changed, 16 insertions(+), 22 deletions(-) diff --git a/apps/web/components/editor/editable-field.tsx b/apps/web/components/editor/editable-field.tsx index b6ef8ad71..b78e442da 100644 --- a/apps/web/components/editor/editable-field.tsx +++ b/apps/web/components/editor/editable-field.tsx @@ -1,10 +1,7 @@ -import { ResizableBox, ResizeCallbackData } from "react-resizable"; -import React, { SyntheticEvent, useEffect, useState } from "react"; +import React, { useState } from "react"; import Draggable from "react-draggable"; -import { CircleStackIcon, TrashIcon } from "@heroicons/react/24/solid"; import Logo from "../logo"; import { IconButton } from "@documenso/ui"; -import toast from "react-hot-toast"; import { XCircleIcon } from "@heroicons/react/20/solid"; const stc = require("string-to-color"); @@ -20,6 +17,7 @@ type FieldPropsType = { }; onPositionChanged: any; onDelete: any; + hidden: boolean; }; export default function EditableField(props: FieldPropsType) { @@ -52,6 +50,7 @@ export default function EditableField(props: FieldPropsType) { cancel="strong" > ))} diff --git a/apps/web/pages/documents/[id]/index.tsx b/apps/web/pages/documents/[id]/index.tsx index d28fed69d..c0c6ca213 100644 --- a/apps/web/pages/documents/[id]/index.tsx +++ b/apps/web/pages/documents/[id]/index.tsx @@ -9,7 +9,6 @@ import { DocumentStatus } from "@prisma/client"; import { InformationCircleIcon, PaperAirplaneIcon, - UserPlusIcon, UsersIcon, } from "@heroicons/react/24/outline"; import { getDocument } from "@documenso/lib/query"; @@ -126,7 +125,7 @@ export async function getServerSideProps(context: any) { return { props: { - document: document, + document: JSON.parse(JSON.stringify(document)), }, }; } catch (error) { diff --git a/apps/web/pages/documents/[id]/recipients.tsx b/apps/web/pages/documents/[id]/recipients.tsx index 72eda2377..e12f351cb 100644 --- a/apps/web/pages/documents/[id]/recipients.tsx +++ b/apps/web/pages/documents/[id]/recipients.tsx @@ -69,7 +69,7 @@ const RecipientsPage: NextPageWithLayout = (props: any) => { className="mr-2" href={breadcrumbItems[1].href} > - Customize Document + Edit Document