|
@@ -3,9 +3,9 @@ import { useEffect, useState } from "react";
|
|
|
import { useIntl } from "react-intl";
|
|
import { useIntl } from "react-intl";
|
|
|
import { get } from "../../request";
|
|
import { get } from "../../request";
|
|
|
import { ICommentListResponse } from "../api/Comment";
|
|
import { ICommentListResponse } from "../api/Comment";
|
|
|
-import CommentCreate from "./DiscussionCreate";
|
|
|
|
|
|
|
+import DiscussionCreate from "./DiscussionCreate";
|
|
|
|
|
|
|
|
-import CommentItem, { IComment } from "./DiscussionItem";
|
|
|
|
|
|
|
+import DiscussionItem, { IComment } from "./DiscussionItem";
|
|
|
|
|
|
|
|
interface IWidget {
|
|
interface IWidget {
|
|
|
topicId?: string;
|
|
topicId?: string;
|
|
@@ -32,6 +32,7 @@ const DiscussionTopicChildrenWidget = ({
|
|
|
resId: item.res_id,
|
|
resId: item.res_id,
|
|
|
resType: item.res_type,
|
|
resType: item.res_type,
|
|
|
user: item.editor,
|
|
user: item.editor,
|
|
|
|
|
+ parent: item.parent,
|
|
|
title: item.title,
|
|
title: item.title,
|
|
|
content: item.content,
|
|
content: item.content,
|
|
|
createdAt: item.created_at,
|
|
createdAt: item.created_at,
|
|
@@ -60,11 +61,11 @@ const DiscussionTopicChildrenWidget = ({
|
|
|
dataSource={data}
|
|
dataSource={data}
|
|
|
renderItem={(item) => (
|
|
renderItem={(item) => (
|
|
|
<List.Item>
|
|
<List.Item>
|
|
|
- <CommentItem data={item} />
|
|
|
|
|
|
|
+ <DiscussionItem data={item} />
|
|
|
</List.Item>
|
|
</List.Item>
|
|
|
)}
|
|
)}
|
|
|
/>
|
|
/>
|
|
|
- <CommentCreate
|
|
|
|
|
|
|
+ <DiscussionCreate
|
|
|
contentType="markdown"
|
|
contentType="markdown"
|
|
|
parent={topicId}
|
|
parent={topicId}
|
|
|
onCreated={(e: IComment) => {
|
|
onCreated={(e: IComment) => {
|