mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
rename pdf viewer
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
import { useState } from "react";
|
import { Fragment, useState } from "react";
|
||||||
import { Document, Page } from "react-pdf/dist/esm/entry.webpack5";
|
import { Document, Page } from "react-pdf/dist/esm/entry.webpack5";
|
||||||
|
import Field from "./editor/field";
|
||||||
|
|
||||||
export default function PDFViewer(props) {
|
export default function PDFViewer(props) {
|
||||||
const [file, setFile] = useState("");
|
const [file, setFile] = useState("");
|
||||||
@ -29,15 +30,33 @@ export default function PDFViewer(props) {
|
|||||||
options={options}
|
options={options}
|
||||||
>
|
>
|
||||||
{Array.from({ length: numPages }, (_, index) => (
|
{Array.from({ length: numPages }, (_, index) => (
|
||||||
<Page
|
<Fragment>
|
||||||
className="mt-5"
|
<div
|
||||||
key={`page_${index + 1}`}
|
style={{
|
||||||
pageNumber={index + 1}
|
position: "relative",
|
||||||
renderAnnotationLayer={false}
|
background: "green",
|
||||||
renderTextLayer={false}
|
}}
|
||||||
onLoadSuccess={() => setLoading(false)}
|
>
|
||||||
onRenderError={() => setLoading(false)}
|
<div
|
||||||
/>
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
background: "red",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Page
|
||||||
|
className="mt-5"
|
||||||
|
key={`page_${index + 1}`}
|
||||||
|
pageNumber={index + 1}
|
||||||
|
renderAnnotationLayer={false}
|
||||||
|
renderTextLayer={false}
|
||||||
|
onLoadSuccess={() => setLoading(false)}
|
||||||
|
onRenderError={() => setLoading(false)}
|
||||||
|
>
|
||||||
|
<Field></Field>
|
||||||
|
</Page>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Fragment>
|
||||||
))}
|
))}
|
||||||
</Document>
|
</Document>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user