diff --git a/frontend/app/(main)/waf/rules/editor/components/rule-flow-canvas.tsx b/frontend/app/(main)/waf/rules/editor/components/rule-flow-canvas.tsx index fd2e0fd9..07ba89b9 100644 --- a/frontend/app/(main)/waf/rules/editor/components/rule-flow-canvas.tsx +++ b/frontend/app/(main)/waf/rules/editor/components/rule-flow-canvas.tsx @@ -25,10 +25,9 @@ import { type NodeChange, type ReactFlowInstance, } from '@xyflow/react'; -import { AlignHorizontalSpaceAround, Trash2 } from 'lucide-react'; +import { Trash2 } from 'lucide-react'; import '@xyflow/react/dist/style.css'; -import { Button } from '@/components/ui/button'; import type { WAFRuleEdge, WAFRuleGraph } from '@/lib/services/openflare'; import { cn } from '@/lib/utils'; @@ -39,7 +38,6 @@ import { isConnectionAllowed, isPersistentEdgeChange, } from './editor-behavior'; -import { layoutRuleGraph } from './graph-layout'; import { type GraphIssue, removeEdgeFromGraph, @@ -328,18 +326,6 @@ export function RuleFlowCanvas({ [], ); - const formatLayout = useCallback(() => { - const next = layoutRuleGraph(graph); - onGraphChange(next); - setContextMenu(null); - requestAnimationFrame(() => { - void instance.current?.fitView({ - ...initialFitViewOptions, - duration: 280, - }); - }); - }, [graph, onGraphChange]); - const contextNode = contextMenu?.kind === 'node' ? graph.nodes.find((node) => node.id === contextMenu.id) @@ -357,18 +343,8 @@ export function RuleFlowCanvas({ className='relative min-w-0 flex-1 bg-muted/20' onContextMenu={suppressBrowserContextMenu} > -