fix: resolve TypeScript errors in migrated components

This commit is contained in:
Jason Woltje
2026-01-29 22:00:14 -06:00
parent d54714ea06
commit abbf886483
36 changed files with 758 additions and 43 deletions

View File

@@ -39,7 +39,7 @@ export function MindmapViewer({
updateNode,
deleteNode,
createEdge,
} = useGraphData({ rootId, maxDepth });
} = useGraphData({ ...(rootId && { rootId }), maxDepth });
const handleViewModeChange = useCallback(
async (mode: ViewMode) => {
@@ -170,9 +170,11 @@ export function MindmapViewer({
<ReactFlowEditor
graphData={graph}
onNodeSelect={setSelectedNode}
onNodeUpdate={readOnly ? undefined : updateNode}
onNodeDelete={readOnly ? undefined : handleDeleteNode}
onEdgeCreate={readOnly ? undefined : handleCreateEdge}
{...(!readOnly && {
onNodeUpdate: updateNode,
onNodeDelete: handleDeleteNode,
onEdgeCreate: handleCreateEdge,
})}
readOnly={readOnly}
className="h-full"
/>