jam411 3 лет назад
Родитель
Сommit
bfeca9b183
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      packages/app/src/components/PageComment/Comment.tsx

+ 5 - 5
packages/app/src/components/PageComment/Comment.tsx

@@ -47,11 +47,6 @@ export const Comment = (props: CommentProps): JSX.Element => {
   const updatedAt = new Date(comment.updatedAt);
   const isEdited = createdAt < updatedAt;
 
-  // TODO: Remove when update ReplayComments.jsx
-  if (currentPagePath == null) {
-    return <></>;
-  }
-
   useEffect(() => {
     setMarkdown(comment.comment);
 
@@ -99,6 +94,11 @@ export const Comment = (props: CommentProps): JSX.Element => {
     return <span style={{ whiteSpace: 'pre-wrap' }}>{comment}</span>;
   };
 
+  // TODO: Remove when update ReplayComments.jsx
+  if (currentPagePath == null) {
+    return <></>;
+  }
+
   const renderRevisionBody = () => {
     return (
       <RevisionRenderer