From 7e00ed708568f3d9d602743cfb5f7f890a8bed3c Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Mon, 13 Feb 2023 16:58:25 +0100 Subject: [PATCH] editor comp --- apps/web/components/editor/pdf-editor.tsx | 19 +++++++++++++++++++ apps/web/pages/documents/[id]/index.tsx | 13 ++----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 apps/web/components/editor/pdf-editor.tsx diff --git a/apps/web/components/editor/pdf-editor.tsx b/apps/web/components/editor/pdf-editor.tsx new file mode 100644 index 000000000..14f350f45 --- /dev/null +++ b/apps/web/components/editor/pdf-editor.tsx @@ -0,0 +1,19 @@ +import { NEXT_PUBLIC_WEBAPP_URL } from "@documenso/lib/constants"; +import { useRouter } from "next/router"; +import dynamic from "next/dynamic"; +import React from "react"; + +const PDFViewer = dynamic(() => import("./pdf-viewer"), { + ssr: false, +}); + +export default function PDFEditor(props: any) { + const router = useRouter(); + + return ( + + ); +} diff --git a/apps/web/pages/documents/[id]/index.tsx b/apps/web/pages/documents/[id]/index.tsx index 317c78755..2b1121c9b 100644 --- a/apps/web/pages/documents/[id]/index.tsx +++ b/apps/web/pages/documents/[id]/index.tsx @@ -16,13 +16,7 @@ import { getDocument } from "@documenso/lib/query"; import { Document as PrismaDocument } from "@prisma/client"; import { Button, Breadcrumb } from "@documenso/ui"; import short from "short-uuid"; - -const PDFViewer = dynamic( - () => import("../../../components/editor/pdf-viewer"), - { - ssr: false, - } -); +import PDFEditor from "../../../components/editor/pdf-editor"; const DocumentsDetailPage: NextPageWithLayout = (props: any) => { const router = useRouter(); @@ -97,10 +91,7 @@ const DocumentsDetailPage: NextPageWithLayout = (props: any) => {
- +
);