ConceptPortal-public/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx

19 lines
419 B
TypeScript
Raw Normal View History

2023-07-29 21:23:18 +03:00
import PrettyJson from '../../components/Common/PrettyJSON';
import { useRSForm } from '../../context/RSFormContext';
import { GraphNode } from '../../utils/Graph';
function EditorTermGraph() {
const { schema } = useRSForm();
const data: GraphNode[] = [];
schema?.graph.visitDFS(node => data.push(node));
return (
<div>
<PrettyJson data={data} />
</div>
);
}
export default EditorTermGraph;