Files
sign/apps/web/pages/documents/[id].tsx

24 lines
634 B
TypeScript
Raw Normal View History

2023-01-19 19:24:01 +01:00
import { ReactElement, useEffect } from "react";
2023-01-19 17:42:20 +01:00
import Layout from "../../components/layout";
import { NextPageWithLayout } from "../_app";
2023-01-19 19:24:01 +01:00
import { Document, Page, pdfjs } from "react-pdf";
import dynamic from "next/dynamic";
const PDFViewer = dynamic(() => import("../../components/pdf-viewer"), {
ssr: false,
});
2023-01-19 17:42:20 +01:00
const DocumentsDetailPage: NextPageWithLayout = () => {
2023-01-19 19:24:01 +01:00
return (
<div>
2023-01-23 16:32:06 +01:00
<PDFViewer pdfUrl={"http://localhost:3000/api/documents/3"} />
2023-01-19 19:24:01 +01:00
</div>
);
2023-01-19 17:42:20 +01:00
};
DocumentsDetailPage.getLayout = function getLayout(page: ReactElement) {
return <Layout>{page}</Layout>;
};
export default DocumentsDetailPage;