|
@@ -4,8 +4,8 @@ import React, {
|
|
|
|
|
|
|
|
import { Button } from 'reactstrap';
|
|
import { Button } from 'reactstrap';
|
|
|
|
|
|
|
|
|
|
+import { Nullable } from '~/interfaces/common';
|
|
|
|
|
|
|
|
-import AppContainer from '~/client/services/AppContainer';
|
|
|
|
|
import { toastError } from '~/client/util/apiNotification';
|
|
import { toastError } from '~/client/util/apiNotification';
|
|
|
import { apiPost } from '~/client/util/apiv1-client';
|
|
import { apiPost } from '~/client/util/apiv1-client';
|
|
|
import { useCommentPreviewRenderer } from '~/stores/renderer';
|
|
import { useCommentPreviewRenderer } from '~/stores/renderer';
|
|
@@ -20,8 +20,7 @@ import DeleteCommentModal from './PageComment/DeleteCommentModal';
|
|
|
import ReplayComments from './PageComment/ReplayComments';
|
|
import ReplayComments from './PageComment/ReplayComments';
|
|
|
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
|
- appContainer: AppContainer,
|
|
|
|
|
- pageId: string,
|
|
|
|
|
|
|
+ pageId?: Nullable<string>,
|
|
|
isReadOnly : boolean,
|
|
isReadOnly : boolean,
|
|
|
titleAlign?: 'center' | 'left' | 'right',
|
|
titleAlign?: 'center' | 'left' | 'right',
|
|
|
highlightKeywords?:string[],
|
|
highlightKeywords?:string[],
|
|
@@ -32,7 +31,7 @@ type Props = {
|
|
|
const PageComment:FC<Props> = memo((props:Props):JSX.Element => {
|
|
const PageComment:FC<Props> = memo((props:Props):JSX.Element => {
|
|
|
|
|
|
|
|
const {
|
|
const {
|
|
|
- appContainer, pageId, highlightKeywords, isReadOnly, titleAlign, hideIfEmpty,
|
|
|
|
|
|
|
+ pageId, highlightKeywords, isReadOnly, titleAlign, hideIfEmpty,
|
|
|
} = props;
|
|
} = props;
|
|
|
|
|
|
|
|
const { data: comments, mutate } = useSWRxPageComment(pageId);
|
|
const { data: comments, mutate } = useSWRxPageComment(pageId);
|