Explorar el Código

refactor Commenteditor

yuken hace 4 años
padre
commit
f7ae98cad1
Se han modificado 1 ficheros con 3 adiciones y 9 borrados
  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;