Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

fix ts-error

AykutSaracb3e01e98d35a
diff --git a/src/containers/LiveEditor/CustomNode/ObjectNode.tsx b/src/containers/LiveEditor/CustomNode/ObjectNode.tsx
index 1c71d9d8..8b963d7f 100644
--- a/src/containers/LiveEditor/CustomNode/ObjectNode.tsx
+++ b/src/containers/LiveEditor/CustomNode/ObjectNode.tsx
@@ -2,7 +2,7 @@ import React from "react";
import { CustomNodeProps } from ".";
import * as Styled from "./styles";
-const ObjectNode: React.FC<CustomNodeProps<[string, unknown][]>> = ({
+const ObjectNode: React.FC<CustomNodeProps<[string, string][]>> = ({
width,
height,
value,
diff --git a/src/containers/LiveEditor/CustomNode/index.tsx b/src/containers/LiveEditor/CustomNode/index.tsx
index 27c4da0e..3d5f2879 100644
--- a/src/containers/LiveEditor/CustomNode/index.tsx
+++ b/src/containers/LiveEditor/CustomNode/index.tsx
@@ -27,7 +27,7 @@ export const CustomNode = React.memo((nodeProps: NodeProps) => {
const { width, height } = nodeProps;
if (data.text instanceof Object) {
- const entries = Object.entries(data.text);
+ const entries = Object.entries<string>(data.text);
return (
<ObjectNode
x={nodeProps.x}