diff --git a/packages/sdk/packages/node-renderer/src/components/module/graph/NodeHover.tsx b/packages/sdk/packages/node-renderer/src/components/module/graph/NodeHover.tsx index e2be23b366..0311cfc310 100644 --- a/packages/sdk/packages/node-renderer/src/components/module/graph/NodeHover.tsx +++ b/packages/sdk/packages/node-renderer/src/components/module/graph/NodeHover.tsx @@ -60,7 +60,7 @@ export const ModuleGraphNodeHover: React.FC = ({ node }) => { /> {node ? ( <> - + ) : null} diff --git a/packages/sdk/packages/node-renderer/src/hooks/cytoscape/useNewElements.tsx b/packages/sdk/packages/node-renderer/src/hooks/cytoscape/useNewElements.tsx index 52367a9c3e..7bd0fee34d 100644 --- a/packages/sdk/packages/node-renderer/src/hooks/cytoscape/useNewElements.tsx +++ b/packages/sdk/packages/node-renderer/src/hooks/cytoscape/useNewElements.tsx @@ -1,22 +1,12 @@ import { useModuleFromNode } from '@xyo-network/react-node' import { NodeSingular } from 'cytoscape' -import { useEffect } from 'react' -import { useCytoscapeInstance } from '../../contexts' import { useCytoscapeElements } from './useCytoscapeElements' export const useNewElements = (selectedElement?: NodeSingular) => { - const { cy } = useCytoscapeInstance(true) const { address: selectedAddress } = selectedElement?.data() ?? {} const [module] = useModuleFromNode(selectedAddress) const newElements = useCytoscapeElements(module) - useEffect(() => { - if (selectedAddress) { - const element = cy?.$(`node[id="${selectedAddress}"]`) - if (element?.length) cy?.center(element) - } - }, [cy, selectedAddress]) - return newElements }