A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix: solve the problem that comments cannot be deleted
robin8acd8d654321
diff --git a/ui/src/components/Comment/index.tsx b/ui/src/components/Comment/index.tsxindex 24abb22e..1b4f0178 100644--- a/ui/src/components/Comment/index.tsx+++ b/ui/src/components/Comment/index.tsx@@ -27,7 +27,6 @@ import './index.scss';const Comment = ({ objectId, mode, commentId }) => {const pageUsers = usePageUsers();const [pageIndex, setPageIndex] = useState(0);- const [comments, setComments] = useState<any>([]);const [visibleComment, setVisibleComment] = useState(false);const pageSize = pageIndex === 0 ? 3 : 15;const { data, mutate } = useQueryComments({@@ -36,6 +35,7 @@ const Comment = ({ objectId, mode, commentId }) => {page: pageIndex,page_size: pageSize,});+ const [comments, setComments] = useState<any>(data?.list || []);const reportModal = useReportModal();