reiji-h 1 год назад
Родитель
Сommit
d2a84d93ee
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      apps/app/src/client/components/ReactMarkdownComponents/Header.tsx

+ 3 - 2
apps/app/src/client/components/ReactMarkdownComponents/Header.tsx

@@ -113,11 +113,12 @@ export const Header = (props: HeaderProps): JSX.Element => {
     };
     };
   }, [activateByHash, router.events]);
   }, [activateByHash, router.events]);
 
 
-  // TODO: currentPageYjsData?.hasRevisionBodyDiff === false make to hide the edit button when a Yjs draft exists
+  // TODO: currentPageYjsData?.hasYdocsNewerThanLatestRevision === 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.
   // 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.
   // It will be possible to address this TODO ySyncAnnotation become available for import.
   // Ref: https://github.com/yjs/y-codemirror.next/pull/30
   // Ref: https://github.com/yjs/y-codemirror.next/pull/30
-  const showEditButton = !isGuestUser && !isReadOnlyUser && !isSharedUser && shareLinkId == null && currentPageYjsData?.hasRevisionBodyDiff === false;
+  const showEditButton = !isGuestUser && !isReadOnlyUser && !isSharedUser && shareLinkId == null
+                            && currentPageYjsData?.hasYdocsNewerThanLatestRevision === false;
 
 
   return (
   return (
     <>
     <>