Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix types errors

Marc Seitz86db33e17244
diff --git a/components/EmailForm.tsx b/components/EmailForm.tsx
index 6bd582e6..bcacd30e 100644
--- a/components/EmailForm.tsx
+++ b/components/EmailForm.tsx
@@ -1,4 +1,4 @@
-export default function EmailForm({ onSubmitHandler, setEmail }) {
+export default function EmailForm({ onSubmitHandler, setEmail }: any) {
return (
<>
<div className="flex min-h-full flex-1 flex-col justify-center px-6 py-12 lg:px-8">
diff --git a/pages/documents/[id].tsx b/pages/documents/[id].tsx
index 0e3fe664..a5eb717d 100644
--- a/pages/documents/[id].tsx
+++ b/pages/documents/[id].tsx
@@ -289,6 +289,15 @@ const DocumentPage = ({
};
export const getServerSideProps: GetServerSideProps = async (context) => {
+ if (
+ !context.params ||
+ !context.params.id ||
+ Array.isArray(context.params.id)
+ ) {
+ return {
+ notFound: true,
+ };
+ }
const { id } = context.params;
const session = await getServerSession(context.req, context.res, authOptions);
diff --git a/pages/documents/new.tsx b/pages/documents/new.tsx
index 46c82892..1e7a4dba 100644
--- a/pages/documents/new.tsx
+++ b/pages/documents/new.tsx
@@ -1,6 +1,7 @@
import Sidebar from "@/components/Sidebar";
import { useState, useMemo } from "react";
import { useRouter } from "next/router";
+// @ts-ignore
import type { PutBlobResult } from "@vercel/blob";
import toast from "react-hot-toast";
import Notification from "@/components/Notification";
diff --git a/pages/index.tsx b/pages/index.tsx
index f9bba79b..21e67ecf 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -33,8 +33,8 @@ export default function Example() {
Papermark
</h1>
<p className="mt-6 text-lg leading-8 text-gray-300">
- The dynamic open-source alternative to DocSend. We're on a mission
- to revolutionize content sharing and collaboration.
+ The dynamic open-source alternative to DocSend. We&apos;re on a
+ mission to revolutionize content sharing and collaboration.
</p>
<div className="mt-10 flex items-center gap-x-6">
<Link