AykutSarac 3 years ago
parent
commit
1b25b2ecbf
1 changed files with 9 additions and 8 deletions
  1. 9 8
      src/hocs/config.tsx

+ 9 - 8
src/hocs/config.tsx

@@ -37,13 +37,14 @@ const WithConfig: ReactComponent = ({ children }) => {
   );
 };
 
-const withConfig =
-  <P extends object>(Component: React.ComponentType<P>): React.FC =>
-  (props) =>
-    (
-      <WithConfig>
-        <Component {...(props as P)} />
-      </WithConfig>
-    );
+const withConfig = <P extends object>(
+  Component: React.ComponentType<P>
+): React.FC => {
+  return (props) => (
+    <WithConfig>
+      <Component {...(props as P)} />
+    </WithConfig>
+  );
+};
 
 export { WithConfig, useConfig, ConfigContext, withConfig };