Skip to content

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

fix: expiration time

Marc Seitzfa3045873dfb
diff --git a/components/view/dataroom/downloads-panel.tsx b/components/view/dataroom/downloads-panel.tsx
index dbd3de46..c9a4318f 100644
--- a/components/view/dataroom/downloads-panel.tsx
+++ b/components/view/dataroom/downloads-panel.tsx
@@ -199,6 +199,7 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
if (!expiresAt) return "";
const exp = new Date(expiresAt);
const now = new Date();
+ if (exp.getTime() <= now.getTime()) return "expired";
const d = Math.floor(
(exp.getTime() - now.getTime()) / (1000 * 60 * 60 * 24),
);