From 2eb37f2434ecbf6c86cf531679e27519e71b624a Mon Sep 17 00:00:00 2001 From: Mahesh Chandra <148360659+maheshchandra10@users.noreply.github.com> Date: Fri, 27 Oct 2023 19:47:05 +0000 Subject: [PATCH] fix: Typo in example code --- project/packages/examples/src/common/SampleGraph.tsx | 6 +++--- website/src/components/GraphDefault.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/project/packages/examples/src/common/SampleGraph.tsx b/project/packages/examples/src/common/SampleGraph.tsx index 414c21c5..2baf643b 100644 --- a/project/packages/examples/src/common/SampleGraph.tsx +++ b/project/packages/examples/src/common/SampleGraph.tsx @@ -14,7 +14,7 @@ export const SampleGraph: FC = () => { const registerEvents = useRegisterEvents(); const setSettings = useSetSettings(); const loadGraph = useLoadGraph(); - const { assign: assingCircular } = useLayoutCircular(); + const { assign: assignCircular } = useLayoutCircular(); const [hoveredNode, setHoveredNode] = useState(null); /** @@ -34,14 +34,14 @@ export const SampleGraph: FC = () => { }); }); loadGraph(graph); - assingCircular(); + assignCircular(); // Register the events registerEvents({ enterNode: (event) => setHoveredNode(event.node), leaveNode: () => setHoveredNode(null), }); - }, [assingCircular, loadGraph, registerEvents, faker.datatype, faker.name, randomColor]); + }, [assignCircular, loadGraph, registerEvents, faker.datatype, faker.name, randomColor]); /** * When component mount or hovered node change diff --git a/website/src/components/GraphDefault.tsx b/website/src/components/GraphDefault.tsx index 83a6472d..9f002622 100644 --- a/website/src/components/GraphDefault.tsx +++ b/website/src/components/GraphDefault.tsx @@ -21,7 +21,7 @@ export interface GraphDefaultProps { export const GraphDefault: React.FC = ({ order, probability }) => { const { faker, randomColor } = useSeedRandom(); const sigma = useSigma(); - const { assign: assingCircular } = useLayoutCircular(); + const { assign: assignCircular } = useLayoutCircular(); const registerEvents = useRegisterEvents(); const loadGraph = useLoadGraph(); const setSettings = useSetSettings(); @@ -47,14 +47,14 @@ export const GraphDefault: React.FC = ({ order, probability } } loadGraph(graph); - assingCircular(); + assignCircular(); // Register the events registerEvents({ enterNode: (event) => setHoveredNode(event.node), leaveNode: () => setHoveredNode(null), }); - }, [assingCircular, loadGraph, registerEvents, faker.datatype, faker.name, randomColor, order, probability]); + }, [assignCircular, loadGraph, registerEvents, faker.datatype, faker.name, randomColor, order, probability]); useEffect(() => { setSettings({