feat(renderer): EditorPane with empty state and CodeMirror rendering

This commit is contained in:
2026-06-05 12:42:25 +05:30
parent 3effacf816
commit 9a7e994224
2 changed files with 63 additions and 0 deletions
@@ -0,0 +1,25 @@
import { CodeMirrorEditor } from './CodeMirrorEditor';
import { useEditorStore } from '@/stores/editor-store';
export function EditorPane() {
const { buffers, activeId } = useEditorStore();
const buf = activeId ? buffers.get(activeId) : null;
if (!buf) {
return (
<div className="flex h-full items-center justify-center bg-background text-muted-foreground">
<p>No file open. Use File Open to start.</p>
</div>
);
}
return (
<div className="h-full">
<CodeMirrorEditor
key={buf.id}
bufferId={buf.id}
initialContent={buf.content}
/>
</div>
);
}