doc opload poc

This commit is contained in:
Timur Ercan
2023-01-23 18:25:14 +01:00
parent 305bd3afb8
commit 1dd0fea158
4 changed files with 43 additions and 34 deletions

View File

@ -3,15 +3,21 @@ import Layout from "../../components/layout";
import { NextPageWithLayout } from "../_app";
import { Document, Page, pdfjs } from "react-pdf";
import dynamic from "next/dynamic";
import { useRouter } from "next/router";
import { NEXT_PUBLIC_WEBAPP_URL } from "@documenso/lib";
const PDFViewer = dynamic(() => import("../../components/pdf-viewer"), {
ssr: false,
});
const DocumentsDetailPage: NextPageWithLayout = () => {
const router = useRouter();
return (
<div>
<PDFViewer pdfUrl={"http://localhost:3000/api/documents/3"} />
<PDFViewer
pdfUrl={`${NEXT_PUBLIC_WEBAPP_URL}/api/documents/${router.query.id}`}
/>
</div>
);
};