Przeglądaj źródła

CommentTopic 组件 resId 不提供

visuddhinanda 3 lat temu
rodzic
commit
8c40374178
1 zmienionych plików z 6 dodań i 12 usunięć
  1. 6 12
      dashboard/src/components/comment/CommentBox.tsx

+ 6 - 12
dashboard/src/components/comment/CommentBox.tsx

@@ -67,18 +67,12 @@ const Widget = ({ trigger, resId, resType, onCommentCountChange }: IWidget) => {
           onClose={onChildrenDrawerClose}
           open={childrenDrawer}
         >
-          {resId && resType ? (
-            <CommentTopic
-              comment={topicComment}
-              resId={resId}
-              resType={resType}
-              onItemCountChange={(count: number, parent: string) => {
-                setAnswerCount({ id: parent, count: count });
-              }}
-            />
-          ) : (
-            <></>
-          )}
+          <CommentTopic
+            topicId={topicComment?.id}
+            onItemCountChange={(count: number, parent: string) => {
+              setAnswerCount({ id: parent, count: count });
+            }}
+          />
         </Drawer>
       </Drawer>
     </>