jam411 3 سال پیش
والد
کامیت
417732602f

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

@@ -25,7 +25,7 @@ type Props = {
   hideIfEmpty?: boolean,
   hideIfEmpty?: boolean,
 }
 }
 
 
-export const PageComment:FC<Props> = memo((props:Props):JSX.Element => {
+export const PageComment: FC<Props> = memo((props:Props): JSX.Element => {
 
 
   const {
   const {
     highlightKeywords, isReadOnly, titleAlign, hideIfEmpty,
     highlightKeywords, isReadOnly, titleAlign, hideIfEmpty,

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

@@ -29,10 +29,12 @@ type CommentProps = {
 }
 }
 
 
 export const Comment = (props: CommentProps): JSX.Element => {
 export const Comment = (props: CommentProps): JSX.Element => {
+
   const {
   const {
     comment, isReadOnly, deleteBtnClicked, onComment, rendererOptions,
     comment, isReadOnly, deleteBtnClicked, onComment, rendererOptions,
     currentPagePath, currentRevisionId, currentRevisionCreatedAt,
     currentPagePath, currentRevisionId, currentRevisionCreatedAt,
   } = props;
   } = props;
+
   const { t } = useTranslation();
   const { t } = useTranslation();
   const { data: currentUser } = useCurrentUser();
   const { data: currentUser } = useCurrentUser();
 
 

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

@@ -61,6 +61,7 @@ export const CommentEditor = (props: PropsType): JSX.Element => {
     rendererOptions, isForNewComment, replyTo,
     rendererOptions, isForNewComment, replyTo,
     currentCommentId, commentBody, onCancelButtonClicked, onCommentButtonClicked,
     currentCommentId, commentBody, onCancelButtonClicked, onCommentButtonClicked,
   } = props;
   } = props;
+
   const { data: currentUser } = useCurrentUser();
   const { data: currentUser } = useCurrentUser();
   const { data: currentPagePath } = useCurrentPagePath();
   const { data: currentPagePath } = useCurrentPagePath();
   const { data: currentPageId } = useCurrentPageId();
   const { data: currentPageId } = useCurrentPageId();

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

@@ -9,6 +9,7 @@ type CommentPreviewPorps = {
 }
 }
 
 
 export const CommentPreview = (props: CommentPreviewPorps): JSX.Element => {
 export const CommentPreview = (props: CommentPreviewPorps): JSX.Element => {
+
   const { markdown, path, rendererOptions } = props;
   const { markdown, path, rendererOptions } = props;
 
 
   return (
   return (

+ 2 - 2
packages/app/src/components/PageComment/ReplayComments.tsx

@@ -22,10 +22,12 @@ type ReplaycommentsProps = {
 }
 }
 
 
 export const ReplayComments = (props: ReplaycommentsProps): JSX.Element => {
 export const ReplayComments = (props: ReplaycommentsProps): JSX.Element => {
+
   const {
   const {
     isReadOnly, replyList, deleteBtnClicked, onComment, rendererOptions,
     isReadOnly, replyList, deleteBtnClicked, onComment, rendererOptions,
     currentPagePath, currentRevisionId, currentRevisionCreatedAt,
     currentPagePath, currentRevisionId, currentRevisionCreatedAt,
   } = props;
   } = props;
+
   const { data: isAllReplyShown } = useIsAllReplyShown();
   const { data: isAllReplyShown } = useIsAllReplyShown();
 
 
   const [isOlderRepliesShown, setIsOlderRepliesShown] = useState(false);
   const [isOlderRepliesShown, setIsOlderRepliesShown] = useState(false);
@@ -58,11 +60,9 @@ export const ReplayComments = (props: ReplaycommentsProps): JSX.Element => {
   }
   }
 
 
   const areThereHiddenReplies = (replyList.length > 2);
   const areThereHiddenReplies = (replyList.length > 2);
-
   const toggleButtonIconName = isOlderRepliesShown ? 'icon-arrow-up' : 'icon-options-vertical';
   const toggleButtonIconName = isOlderRepliesShown ? 'icon-arrow-up' : 'icon-options-vertical';
   const toggleButtonIcon = <i className={`icon-fw ${toggleButtonIconName}`}></i>;
   const toggleButtonIcon = <i className={`icon-fw ${toggleButtonIconName}`}></i>;
   const toggleButtonLabel = isOlderRepliesShown ? '' : 'more';
   const toggleButtonLabel = isOlderRepliesShown ? '' : 'more';
-
   const shownReplies = replyList.slice(replyList.length - 2, replyList.length);
   const shownReplies = replyList.slice(replyList.length - 2, replyList.length);
   const hiddenReplies = replyList.slice(0, replyList.length - 2);
   const hiddenReplies = replyList.slice(0, replyList.length - 2);