jam411 3 лет назад
Родитель
Сommit
6540e4b284

+ 0 - 1
packages/app/src/components/Comments.tsx

@@ -3,7 +3,6 @@ import React from 'react';
 import { IRevisionHasId } from '@growi/core';
 import dynamic from 'next/dynamic';
 
-
 import { PageComment } from '~/components/PageComment';
 import { useSWRxPageComment } from '~/stores/comment';
 

+ 1 - 2
packages/app/src/components/PageComment/Comment.tsx

@@ -35,7 +35,7 @@ type CommentProps = {
 export const Comment = (props: CommentProps): JSX.Element => {
 
   const {
-    comment, revisionId, revisionCreatedAt, currentUser, isReadOnly, deleteBtnClicked, onComment, rendererOptions,
+    comment, revisionId, revisionCreatedAt, currentUser, isReadOnly, deleteBtnClicked, onComment,
   } = props;
 
   const { t } = useTranslation();
@@ -110,7 +110,6 @@ export const Comment = (props: CommentProps): JSX.Element => {
           rendererOptions={rendererOptions}
           markdown={markdown}
           additionalClassName="comment"
-          pagePath={currentPagePath}
         />
       )
       : renderText(comment.comment);

+ 1 - 6
packages/app/src/components/PageComment/CommentEditor.tsx

@@ -208,12 +208,7 @@ export const CommentEditor = (props: CommentEditorProps): JSX.Element => {
       return <></>;
     }
 
-    return (
-      <CommentPreview
-        markdown={comment}
-        path={currentPagePath}
-      />
-    );
+    return <CommentPreview markdown={comment} />;
   }, [currentPagePath, comment]);
 
   const renderBeforeReady = useCallback((): JSX.Element => {

+ 1 - 2
packages/app/src/components/PageComment/CommentPreview.tsx

@@ -8,12 +8,11 @@ import styles from './CommentPreview.module.scss';
 
 type CommentPreviewPorps = {
   markdown: string,
-  path: string,
 }
 
 export const CommentPreview = (props: CommentPreviewPorps): JSX.Element => {
 
-  const { markdown, path } = props;
+  const { markdown } = props;
 
   const { data: rendererOptions } = useCommentPreviewOptions();
 

+ 1 - 1
packages/app/src/components/PageComment/DeleteCommentModal.tsx

@@ -1,4 +1,4 @@
-import React, { useMemo } from 'react';
+import React from 'react';
 
 import { UserPicture } from '@growi/ui';
 import { format } from 'date-fns';

+ 1 - 1
packages/app/src/components/PageComment/ReplyComments.tsx

@@ -25,7 +25,7 @@ type ReplycommentsProps = {
 export const ReplyComments = (props: ReplycommentsProps): JSX.Element => {
 
   const {
-    isReadOnly, revisionId, revisionCreatedAt, currentUser, replyList, deleteBtnClicked, onComment, rendererOptions,
+    isReadOnly, revisionId, revisionCreatedAt, currentUser, replyList, deleteBtnClicked, onComment,
   } = props;
 
   const { data: isAllReplyShown } = useIsAllReplyShown();