Skip to content

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

fix: disable if notion doc

Marc Seitza2ac8a80e437
diff --git a/components/documents/document-card.tsx b/components/documents/document-card.tsx
index 784869d5..437f118f 100644
--- a/components/documents/document-card.tsx
+++ b/components/documents/document-card.tsx
@@ -103,18 +103,20 @@ export default function DocumentsCard({
</div>
<div className="flex flex-row space-x-2">
- <button
- onClick={(e) => {
- e.stopPropagation();
- activateOrRedirectAssistant();
- }}
- className="group/button flex items-center z-10 space-x-1 rounded-md ring-1 ring-gray-200 dark:ring-gray-700 px-2 py-0.5 transition-all duration-75 hover:scale-105 active:scale-95"
- >
- <PapermarkSparkle className="h-4 w-4 text-gray-400 group-hover/row:text-foreground group-hover/row:animate-pulse group-hover/button:text-white group-hover/button:animate-none" />
- <span className="whitespace-nowrap text-sm ml-1 hidden sm:inline-block text-gray-400 group-hover/button:text-white">
- AI Assistant
- </span>
- </button>
+ {document.type === "notion" ? (
+ <button
+ onClick={(e) => {
+ e.stopPropagation();
+ activateOrRedirectAssistant();
+ }}
+ className="group/button flex items-center z-10 space-x-1 rounded-md ring-1 ring-gray-200 dark:ring-gray-700 px-2 py-0.5 transition-all duration-75 hover:scale-105 active:scale-95"
+ >
+ <PapermarkSparkle className="h-4 w-4 text-gray-400 group-hover/row:text-foreground group-hover/row:animate-pulse group-hover/button:text-white group-hover/button:animate-none" />
+ <span className="whitespace-nowrap text-sm ml-1 hidden sm:inline-block text-gray-400 group-hover/button:text-white">
+ AI Assistant
+ </span>
+ </button>
+ ) : null}
<Link
onClick={(e) => {