import React from 'react'
import Dashboard from './components/Dashboard'
class ErrorBoundary extends React.Component {
constructor(props) {
super(props)
this.state = { error: null }
}
static getDerivedStateFromError(error) {
return { error }
}
componentDidCatch(error, info) {
console.error('Dashboard crashed:', error, info)
}
render() {
if (this.state.error) {
return (
The dashboard hit a render error
{String(this.state.error?.message || this.state.error)}
)
}
return this.props.children
}
}
export default function App() {
const [theme, setTheme] = React.useState(() => {
if (typeof window === 'undefined') return 'light'
return localStorage.getItem('clm-theme') || 'light'
})
React.useEffect(() => {
try { localStorage.setItem('clm-theme', theme) } catch {}
}, [theme])
const isDark = theme === 'dark'
const palette = isDark
? { bg: '#0b1220', headerBg: '#0f172a', headerBorder: '#1e293b',
text: '#e2e8f0', subText: '#94a3b8', border: '#334155',
bannerFrom: '#1e3a8a', bannerTo: '#0c4a6e' }
: { bg: '#f1f5f9', headerBg: '#ffffff', headerBorder: '#e2e8f0',
text: '#0f172a', subText: '#64748b', border: '#cbd5e1',
bannerFrom: '#4f46e5', bannerTo: '#0ea5e9' }
return (
{/* Header */}
{/* Banner */}
AI agent plays live — press Play Episode to start streaming.
Switch to Manual to control the agent yourself.
{/* Content */}
)
}