reiji-h 1 rok temu
rodzic
commit
e31efbdf7f

+ 4 - 0
apps/app/src/client/components/ReactMarkdownComponents/Header.tsx

@@ -113,6 +113,10 @@ export const Header = (props: HeaderProps): JSX.Element => {
     };
   }, [activateByHash, router.events]);
 
+  // TODO: currentPageYjsData?.hasRevisionBodyDiff === false make to hide the edit button when a Yjs draft exists
+  // This is because the current conditional logic cannot handle cases where the draft is an empty string.
+  // It will be possible to address this TODO ySyncAnnotation become available for import.
+  // Ref: https://github.com/yjs/y-codemirror.next/pull/30
   const showEditButton = !isGuestUser && !isReadOnlyUser && !isSharedUser && shareLinkId == null && currentPageYjsData?.hasRevisionBodyDiff === false;
 
   return (