Skip to content

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

fix: update preview text

Marc Seitz75044a3e00c8
diff --git a/components/emails/viewed-document.tsx b/components/emails/viewed-document.tsx
index 1076a0b2..850e5c66 100644
--- a/components/emails/viewed-document.tsx
+++ b/components/emails/viewed-document.tsx
@@ -25,7 +25,7 @@ export default function ViewedDocument({
return (
<Html>
<Head />
- <Preview>Invalid Domain Configuration</Preview>
+ <Preview>See who visited your document</Preview>
<Tailwind>
<Body className="bg-white my-auto mx-auto font-sans">
<Container className="my-10 mx-auto p-5 w-[465px]">
diff --git a/components/view/document-view.tsx b/components/view/document-view.tsx
index 12e541d7..a1e27c5b 100644
--- a/components/view/document-view.tsx
+++ b/components/view/document-view.tsx
@@ -98,6 +98,7 @@ export default function DocumentView({
} else {
const { message } = await response.json();
toast.error(message);
+ setIsLoading(false);
}
};
diff --git a/pages/api/views.ts b/pages/api/views.ts
index 5aa2c5f6..7f84b3a6 100644
--- a/pages/api/views.ts
+++ b/pages/api/views.ts
@@ -97,6 +97,8 @@ export default async function handle(
viewerEmail: email,
});
+
+ // TODO: this can be offloaded to a background job in the future to save some time
// send email to document owner that document has been viewed
await sendViewedDocumentEmail(
newView.document.owner.email as string,