Skip to content

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

lint code

AykutSaracaf51b4377122
diff --git a/src/components/Graph/index.tsx b/src/components/Graph/index.tsx
index ac904699..9b930926 100644
--- a/src/components/Graph/index.tsx
+++ b/src/components/Graph/index.tsx
@@ -1,4 +1,3 @@
-// @ts-nocheck
import React from "react";
import {
ReactZoomPanPinchRef,
@@ -44,9 +43,9 @@ const StyledEditorWrapper = styled.div<{ isWidget: boolean }>`
const GraphComponent = ({ isWidget, openModal, setSelectedNode }: LayoutProps) => {
const setConfig = useConfig(state => state.setConfig);
const setGraphValue = useGraph(state => state.setGraphValue);
+ const loading = useGraph(state => state.loading);
const layout = useConfig(state => state.layout);
const nodes = useGraph(state => state.nodes);
- const loading = useGraph(state => state.loading);
const edges = useGraph(state => state.edges);
const [size, setSize] = React.useState({
@@ -88,7 +87,7 @@ const GraphComponent = ({ isWidget, openModal, setSelectedNode }: LayoutProps) =
if (input) input.blur();
}, []);
- if (nodes.length > 5_000) return <ErrorView />;
+ if (nodes.length > 8_000) return <ErrorView />;
return (
<StyledEditorWrapper isWidget={isWidget}>
@@ -111,7 +110,7 @@ const GraphComponent = ({ isWidget, openModal, setSelectedNode }: LayoutProps) =
width: "100%",
height: "100%",
overflow: "hidden",
- display: loading ? "none" : "block"
+ display: loading ? "none" : "block",
}}
>
<Canvas
diff --git a/src/components/Loading/index.tsx b/src/components/Loading/index.tsx
index c2e8735a..6b4de428 100644
--- a/src/components/Loading/index.tsx
+++ b/src/components/Loading/index.tsx
@@ -26,9 +26,8 @@ const StyledLoading = styled.div`
background: ${({ theme }) => theme.BLACK_DARK};
z-index: 36;
pointer-events: none;
- animation: 0.5s ${fadeIn};
+ animation: 0.2s ${fadeIn};
animation-fill-mode: forwards;
-
visibility: hidden;
`;
diff --git a/src/components/MonacoEditor/index.tsx b/src/components/MonacoEditor/index.tsx
index 4a6fcf87..c141e4cb 100644
--- a/src/components/MonacoEditor/index.tsx
+++ b/src/components/MonacoEditor/index.tsx
@@ -42,9 +42,9 @@ export const MonacoEditor = ({
React.useEffect(() => {
const { nodes, edges } = parser(json, expand);
+ setGraphValue("loading", true);
setGraphValue("nodes", nodes);
setGraphValue("edges", edges);
- setGraphValue("loading", true);
setValue(json);
}, [expand, json, setGraphValue]);
@@ -65,7 +65,7 @@ export const MonacoEditor = ({
}, 1200);
return () => clearTimeout(formatTimer);
- }, [value, setJson, setHasError, setGraphValue]);
+ }, [value, setJson, setHasError]);
return (
<StyledWrapper>