Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: redundant code
Marc Seitz806faa8094fb
diff --git a/components/view/viewer/dataroom-viewer.tsx b/components/view/viewer/dataroom-viewer.tsxindex 602daaca..6d334b5c 100644--- a/components/view/viewer/dataroom-viewer.tsx+++ b/components/view/viewer/dataroom-viewer.tsx@@ -112,12 +112,12 @@ export default function DataroomViewer({if (!allowDownload) return false;if (!documents || documents.length === 0) return false;- return documents.some(doc => {+ return documents.some((doc) => {if (doc.versions[0].type === "notion") return false;const accessControl = accessControls.find((access) => access.itemId === doc.dataroomDocumentId,);- return (accessControl?.canDownload ?? true);+ return accessControl?.canDownload ?? true;});}, [documents, accessControls, allowDownload]);@@ -146,23 +146,6 @@ export default function DataroomViewer({return mixedItems.sort((a, b) => (a.orderIndex || 0) - (b.orderIndex || 0));}, [folders, documents, folderId, accessControls]);-const allDocumentsCanDownload = useMemo(() => {- if (!allowDownload) return false;-- if (!documents || documents.length === 0) return false;-- return documents.some((doc) => {- if (doc.versions[0].type === "notion") return false;-- const accessControl = accessControls.find(- (access) => access.itemId === doc.dataroomDocumentId,- );-- return accessControl?.canDownload ?? true;- });-}, [documents, accessControls, allowDownload]);--const renderItem = (item: FolderOrDocument) => {if ("versions" in item) {return (