const CodeEditorView = () => { const iframeRef = React.useRef(null); const sendKey = () => { const url = window.getAmdUrl ? window.getAmdUrl() : ''; if (url && iframeRef.current?.contentWindow) { iframeRef.current.contentWindow.postMessage({ type: 'AMD_URL', url }, '*'); } }; return (