✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
lint code
AykutSarac51ba940aa397
diff --git a/src/components/CustomNode/index.tsx b/src/components/CustomNode/index.tsxindex 7c6a16f0..15d504a9 100644--- a/src/components/CustomNode/index.tsx+++ b/src/components/CustomNode/index.tsx@@ -19,34 +19,33 @@ const baseLabelStyle = {};export const CustomNode = (nodeProps: NodeProps) => {- const { properties: data } = nodeProps;+ const { properties } = nodeProps;return (<Node {...nodeProps} label={<Label style={baseLabelStyle} />}>- {() => {- const { width, height } = nodeProps;+ {({ width, height, x, y }) => {+ if (properties.text instanceof Object) {+ const entries = Object.entries<string>(properties.text);- if (data.text instanceof Object) {- const entries = Object.entries<string>(data.text);return (<ObjectNode- x={nodeProps.x}- y={nodeProps.y}+ value={entries}width={width}height={height}- value={entries}+ x={x}+ y={y}/>);}return (<TextNode- isParent={data.data.isParent}+ isParent={properties.data.isParent}+ value={properties.text}width={width}height={height}- value={data.text}- x={nodeProps.x}- y={nodeProps.y}+ x={x}+ y={y}/>);}}