瀏覽代碼

refactor Commenteditor

yuken 4 年之前
父節點
當前提交
f7ae98cad1
共有 1 個文件被更改,包括 3 次插入9 次删除
  1. 3 9
      packages/app/src/components/PageComment/CommentEditor.tsx

+ 3 - 9
packages/app/src/components/PageComment/CommentEditor.tsx

@@ -426,14 +426,8 @@ const CommentEditor = (props: PropsType): JSX.Element => {
 /**
  * Wrapper component for using unstated
  */
-const CommentEditorHOCWrapper = withUnstatedContainers(CommentEditor, [AppContainer, PageContainer, EditorContainer, CommentContainer]);
-
-const CommentEditorWrapper = (props): JSX.Element => {
-  return (
-    <CommentEditorHOCWrapper
-      {...props}
-    />
-  );
-};
+const CommentEditorWrapper = withUnstatedContainers<unknown, Partial<PropsType>>(
+  CommentEditor, [AppContainer, PageContainer, EditorContainer, CommentContainer],
+);
 
 export default CommentEditorWrapper;