|
@@ -10,7 +10,6 @@ import {
|
|
|
import * as toastr from 'toastr';
|
|
import * as toastr from 'toastr';
|
|
|
|
|
|
|
|
import { apiPostForm } from '~/client/util/apiv1-client';
|
|
import { apiPostForm } from '~/client/util/apiv1-client';
|
|
|
-import { RendererOptions } from '~/services/renderer/renderer';
|
|
|
|
|
import { useSWRxPageComment } from '~/stores/comment';
|
|
import { useSWRxPageComment } from '~/stores/comment';
|
|
|
import {
|
|
import {
|
|
|
useCurrentPagePath, useCurrentPageId, useCurrentUser, useRevisionId, useIsSlackConfigured,
|
|
useCurrentPagePath, useCurrentPageId, useCurrentUser, useRevisionId, useIsSlackConfigured,
|
|
@@ -40,7 +39,6 @@ const navTabMapping = {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
type PropsType = {
|
|
type PropsType = {
|
|
|
- rendererOptions: RendererOptions,
|
|
|
|
|
isForNewComment?: boolean,
|
|
isForNewComment?: boolean,
|
|
|
replyTo?: string,
|
|
replyTo?: string,
|
|
|
currentCommentId?: string,
|
|
currentCommentId?: string,
|
|
@@ -58,7 +56,7 @@ type EditorRef = {
|
|
|
export const CommentEditor = (props: PropsType): JSX.Element => {
|
|
export const CommentEditor = (props: PropsType): JSX.Element => {
|
|
|
|
|
|
|
|
const {
|
|
const {
|
|
|
- rendererOptions, isForNewComment, replyTo,
|
|
|
|
|
|
|
+ isForNewComment, replyTo,
|
|
|
currentCommentId, commentBody, onCancelButtonClicked, onCommentButtonClicked,
|
|
currentCommentId, commentBody, onCancelButtonClicked, onCommentButtonClicked,
|
|
|
} = props;
|
|
} = props;
|
|
|
const { data: currentUser } = useCurrentUser();
|
|
const { data: currentUser } = useCurrentUser();
|
|
@@ -211,12 +209,11 @@ export const CommentEditor = (props: PropsType): JSX.Element => {
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<CommentPreview
|
|
<CommentPreview
|
|
|
- rendererOptions={rendererOptions}
|
|
|
|
|
markdown={markdown}
|
|
markdown={markdown}
|
|
|
- currentPagePath={currentPagePath}
|
|
|
|
|
|
|
+ path={currentPagePath}
|
|
|
/>
|
|
/>
|
|
|
);
|
|
);
|
|
|
- }, [currentPagePath, markdown, rendererOptions]);
|
|
|
|
|
|
|
+ }, [currentPagePath, markdown]);
|
|
|
|
|
|
|
|
const renderBeforeReady = useCallback((): JSX.Element => {
|
|
const renderBeforeReady = useCallback((): JSX.Element => {
|
|
|
return (
|
|
return (
|