mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
pdf view url param
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { useState } from "react";
|
||||
import { Document, Page } from "react-pdf/dist/esm/entry.webpack5";
|
||||
|
||||
export default function PDFViewer() {
|
||||
export default function PDFViewer(props) {
|
||||
const [file, setFile] = useState("./sample.pdf");
|
||||
const [numPages, setNumPages] = useState(null);
|
||||
|
||||
@ -23,7 +23,7 @@ export default function PDFViewer() {
|
||||
<>
|
||||
<div className="">
|
||||
<Document
|
||||
file={"/sample.pdf"}
|
||||
file={props.pdfUrl}
|
||||
onLoadSuccess={onDocumentLoadSuccess}
|
||||
options={options}
|
||||
>
|
||||
|
||||
@ -11,7 +11,7 @@ const PDFViewer = dynamic(() => import("../../components/pdf-viewer"), {
|
||||
const DocumentsDetailPage: NextPageWithLayout = () => {
|
||||
return (
|
||||
<div>
|
||||
<PDFViewer />
|
||||
<PDFViewer pdfUrl={"http://localhost:3000/api/documents/3"} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user