mirror of
https://github.com/documenso/documenso.git
synced 2025-11-16 09:41:35 +10:00
Merge branch '404' of https://github.com/ElTimuro/documenso into 404
This commit is contained in:
10
apps/web/pages/500.jsx
Normal file
10
apps/web/pages/500.jsx
Normal file
@ -0,0 +1,10 @@
|
||||
import Link from "next/link";
|
||||
|
||||
export default function FiveUhOh() {
|
||||
return (
|
||||
<>
|
||||
<h1>500 - Something went wrong.</h1>
|
||||
<Link href="/">Go back home</Link>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@ -16,10 +16,7 @@ import { getDocument } from "@documenso/lib/query";
|
||||
import { Document as PrismaDocument } from "@prisma/client";
|
||||
import { Button, Breadcrumb } from "@documenso/ui";
|
||||
import short from "short-uuid";
|
||||
|
||||
const PDFViewer = dynamic(() => import("../../../components/pdf-viewer"), {
|
||||
ssr: false,
|
||||
});
|
||||
import PDFEditor from "../../../components/editor/pdf-editor";
|
||||
|
||||
const DocumentsDetailPage: NextPageWithLayout = (props: any) => {
|
||||
const router = useRouter();
|
||||
@ -94,10 +91,7 @@ const DocumentsDetailPage: NextPageWithLayout = (props: any) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="mx-auto w-fit">
|
||||
<PDFViewer
|
||||
document={props.document}
|
||||
pdfUrl={`${NEXT_PUBLIC_WEBAPP_URL}/api/documents/${router.query.id}`}
|
||||
/>
|
||||
<PDFEditor document={props.document} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@ -131,6 +125,12 @@ export async function getServerSideProps(context: any) {
|
||||
// todo optimize querys
|
||||
// todo no intersection groups
|
||||
|
||||
if (!document) {
|
||||
return {
|
||||
notFound: true,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
props: {
|
||||
document: document,
|
||||
|
||||
Reference in New Issue
Block a user