Ver código fonte

fix node export

AykutSarac 3 anos atrás
pai
commit
7e2c760951
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      src/components/CustomNode/index.tsx

+ 6 - 2
src/components/CustomNode/index.tsx

@@ -18,7 +18,7 @@ const baseLabelStyle = {
   strokeWidth: 0,
   strokeWidth: 0,
 };
 };
 
 
-export const CustomNode = React.memo((nodeProps: NodeProps) => {
+const CustomNode = (nodeProps: NodeProps) => {
   const { properties: data } = nodeProps;
   const { properties: data } = nodeProps;
 
 
   return (
   return (
@@ -52,4 +52,8 @@ export const CustomNode = React.memo((nodeProps: NodeProps) => {
       }}
       }}
     </Node>
     </Node>
   );
   );
-});
+};
+
+const MemoizedCustomNode = React.memo(CustomNode);
+
+export { MemoizedCustomNode as CustomNode };