diff --git a/web/src/components/strategy/CodeStrategyEditor.tsx b/web/src/components/strategy/CodeStrategyEditor.tsx index aa81909..ab61f14 100644 --- a/web/src/components/strategy/CodeStrategyEditor.tsx +++ b/web/src/components/strategy/CodeStrategyEditor.tsx @@ -2,7 +2,7 @@ * Monaco-based code strategy editor. * Users write a JS strategy function; "Run Backtest" posts it to /api/backtest. */ -import { useState, useRef } from 'react'; +import { useState } from 'react'; import Editor from '@monaco-editor/react'; import { Play, Save, Copy, RotateCcw } from 'lucide-react'; import { getPlatformAccessToken } from '../../lib/authSession'; @@ -66,7 +66,6 @@ export function CodeStrategyEditor({ const [result, setResult] = useState(null); const [error, setError] = useState(null); const [saved, setSaved] = useState(false); - const editorRef = useRef(null); const handleRunBacktest = async () => { setRunning(true); @@ -189,7 +188,6 @@ export function CodeStrategyEditor({ setCode(v ?? ''); setSaved(false); }} - onMount={(editor) => { editorRef.current = editor; }} theme="light" options={{ fontSize: 13,