import { useState, useEffect } from 'react'; import { FileText, Box } from 'lucide-react'; import { ApiDocViewer } from './components/ApiDocViewer'; import BlueprintPage from './components/blueprint/BlueprintPage'; import { config } from './config'; const _origLog = console.log; const _origError = console.error; const _origWarn = console.warn; console.log = (...args) => { window.electronAPI?.log('log', ...args); _origLog.apply(console, args); }; console.error = (...args) => { window.electronAPI?.log('error', ...args); _origError.apply(console, args); }; console.warn = (...args) => { window.electronAPI?.log('warn', ...args); _origWarn.apply(console, args); }; type Page = 'docs' | 'blueprint'; declare global { interface Window { electronAPI?: { listDocsFiles: (basePath: string) => Promise<{ name: string; path: string; relativePath: string }[]>; readDocFile: (filePath: string) => Promise; log: (level: string, ...args: unknown[]) => void; }; } } function App() { const [currentPage, setCurrentPage] = useState('docs'); const [docsPath, setDocsPath] = useState(''); useEffect(() => { document.title = config.projectName; }, []); return (

{config.projectName}

{currentPage === 'docs' ? ( ) : ( )}
); } export default App;