initial commit
This commit is contained in:
18
src/App.tsx
Normal file
18
src/App.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { GraphRenderer } from "./Graph";
|
||||
|
||||
export default function App() {
|
||||
const containerRef = useRef(null);
|
||||
const firstLevelGraph = new GraphRenderer(containerRef);
|
||||
|
||||
useEffect(() => {
|
||||
firstLevelGraph.render();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="flex-1 p-4">
|
||||
<div ref={containerRef} className="w-full h-full bg-white rounded shadow" style={{minHeight: '600px', overflow: 'auto'}}></div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user