|
@@ -2,6 +2,7 @@ import React, { useEffect, useMemo, useRef } from 'react';
|
|
|
|
|
|
|
|
import type { IRevisionHasId } from '@growi/core';
|
|
import type { IRevisionHasId } from '@growi/core';
|
|
|
import { pagePathUtils } from '@growi/core/dist/utils';
|
|
import { pagePathUtils } from '@growi/core/dist/utils';
|
|
|
|
|
+import { useTranslation } from 'next-i18next';
|
|
|
import dynamic from 'next/dynamic';
|
|
import dynamic from 'next/dynamic';
|
|
|
import { debounce } from 'throttle-debounce';
|
|
import { debounce } from 'throttle-debounce';
|
|
|
|
|
|
|
@@ -33,6 +34,8 @@ export const Comments = (props: CommentsProps): JSX.Element => {
|
|
|
pageId, pagePath, revision, onLoaded,
|
|
pageId, pagePath, revision, onLoaded,
|
|
|
} = props;
|
|
} = props;
|
|
|
|
|
|
|
|
|
|
+ const { t } = useTranslation('');
|
|
|
|
|
+
|
|
|
const { mutate } = useSWRxPageComment(pageId);
|
|
const { mutate } = useSWRxPageComment(pageId);
|
|
|
const { trigger: mutatePageInfo } = useSWRMUTxPageInfo(pageId);
|
|
const { trigger: mutatePageInfo } = useSWRMUTxPageInfo(pageId);
|
|
|
const { data: isDeleted } = useIsTrashPage();
|
|
const { data: isDeleted } = useIsTrashPage();
|
|
@@ -69,7 +72,8 @@ export const Comments = (props: CommentsProps): JSX.Element => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <div className="page-comments-row mt-5 py-4 border-top border-3 d-edit-none d-print-none">
|
|
|
|
|
|
|
+ <div className="page-comments-row mt-5 py-4 border-top d-edit-none d-print-none">
|
|
|
|
|
+ <h4 className="mb-3">{t('comments')}</h4>
|
|
|
<div id="page-comments-list" className="page-comments-list" ref={pageCommentParentRef}>
|
|
<div id="page-comments-list" className="page-comments-list" ref={pageCommentParentRef}>
|
|
|
<PageComment
|
|
<PageComment
|
|
|
pageId={pageId}
|
|
pageId={pageId}
|