Skip to content

Commit d3f6233

Browse files
authored
fix: restore <group> JSX (now typed via global React.JSX declaration in d.ts)
1 parent 7339f79 commit d3f6233

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

frontend/components/NetworkGraph3D.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ interface NetworkGraph3DProps {
2323

2424
const NetworkNode: React.FC<{ node: Node; isHovered: boolean; onHover: (id: string | null) => void }> = ({ node, isHovered, onHover }) => {
2525
const meshRef = useRef<THREE.Mesh>(null);
26-
const group = useMemo(() => {
27-
const g = new THREE.Group();
28-
g.position.set(...node.position);
29-
return g;
30-
}, [node.position]);
3126

3227
useFrame(() => {
3328
if (meshRef.current && isHovered) {
@@ -47,7 +42,7 @@ const NetworkNode: React.FC<{ node: Node; isHovered: boolean; onHover: (id: stri
4742
const nodeSize = isHovered ? 0.3 : 0.2;
4843

4944
return (
50-
<primitive object={group}>
45+
<group position={node.position}>
5146
<Sphere
5247
ref={meshRef}
5348
args={[nodeSize, 32, 32]}
@@ -73,7 +68,7 @@ const NetworkNode: React.FC<{ node: Node; isHovered: boolean; onHover: (id: stri
7368
{node.label}
7469
</Text>
7570
)}
76-
</primitive>
71+
</group>
7772
);
7873
};
7974

0 commit comments

Comments
 (0)