Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
refactor: remove assistantEnabled variable
Marc Seitz5a4100fe8bb1
diff --git a/components/view/nav.tsx b/components/view/nav.tsxindex d6336496..3d02fe7b 100644--- a/components/view/nav.tsx+++ b/components/view/nav.tsx@@ -61,7 +61,6 @@ export type TNavData = {isPreview?: boolean;dataroomId?: string;conversationsEnabled?: boolean;- assistantEnabled?: boolean;isTeamMember?: boolean;annotationsEnabled?: boolean;hasAnnotations?: boolean;@@ -110,7 +109,6 @@ export default function Nav({documentId,dataroomId,conversationsEnabled,- assistantEnabled,isTeamMember,annotationsEnabled,hasAnnotations,@@ -365,21 +363,7 @@ export default function Nav({</DropdownMenuContent></DropdownMenu>) : null}- {assistantEnabled ? (- <Link href={`/view/${linkId}/chat`}>- <Button- className="m-1 bg-gray-900 text-white hover:bg-gray-900/80"- variant={"special"}- size={"icon"}- style={{- backgroundSize: "200% auto",- }}- title="Open AI Document Assistant"- >- <PapermarkSparkle className="h-5 w-5" />- </Button>- </Link>- ) : null}+{allowDownload ? (<ButtononClick={downloadFile}diff --git a/components/view/view-data.tsx b/components/view/view-data.tsxindex 3bfb5ff7..123d9547 100644--- a/components/view/view-data.tsx+++ b/components/view/view-data.tsx@@ -101,7 +101,6 @@ export default function ViewData({("conversationsEnabled" in viewData? viewData.conversationsEnabled: false),- assistantEnabled: document.assistantEnabled,allowDownload:document.downloadOnly ||isDownloadAllowed(canDownload, link.allowDownload ?? false),diff --git a/lib/api/links/link-data.ts b/lib/api/links/link-data.tsindex 639216d1..553855b4 100644--- a/lib/api/links/link-data.ts+++ b/lib/api/links/link-data.ts@@ -391,7 +391,6 @@ export async function fetchDocumentLinkData({select: {id: true,name: true,- assistantEnabled: true,advancedExcelEnabled: true,downloadOnly: true,teamId: true,diff --git a/pages/api/teams/[teamId]/documents/[id]/duplicate.ts b/pages/api/teams/[teamId]/documents/[id]/duplicate.tsindex e2090dd6..92ba3839 100644--- a/pages/api/teams/[teamId]/documents/[id]/duplicate.ts+++ b/pages/api/teams/[teamId]/documents/[id]/duplicate.ts@@ -96,7 +96,6 @@ export default async function handle(id: undefined,teamId: teamId,ownerId: userId,- assistantEnabled: false,createdAt: undefined,updatedAt: undefined,file: document.file.replace(data?.fromLocation!, data?.toLocation!),diff --git a/pages/view/[linkId]/index.tsx b/pages/view/[linkId]/index.tsxindex adc332aa..fdef4061 100644--- a/pages/view/[linkId]/index.tsx+++ b/pages/view/[linkId]/index.tsx@@ -173,8 +173,6 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {document: {...linkDocument,versions: [versionWithoutTypeAndFile],- // TODO: remove this once the assistant feature is re-enabled- assistantEnabled: false,},},brand,diff --git a/pages/view/domains/[domain]/[slug]/index.tsx b/pages/view/domains/[domain]/[slug]/index.tsxindex 533d4d9c..04387578 100644--- a/pages/view/domains/[domain]/[slug]/index.tsx+++ b/pages/view/domains/[domain]/[slug]/index.tsx@@ -155,8 +155,6 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {document: {...linkDocument,versions: [versionWithoutTypeAndFile],- // TODO: remove this once the assistant feature is re-enabled- assistantEnabled: false,},},brand,