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