import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' import PlatformShell from './platform/PlatformShell.jsx' import AdminPortal from './admin/AdminPortal.jsx' import './index.css' // Apply saved theme before first paint to avoid flash const savedTheme = localStorage.getItem('kubekosh-theme') || 'dark' document.documentElement.setAttribute('data-theme', savedTheme) // This bundle is served both by the lightweight Platform API (root paths + /admin) and by // every ephemeral per-student Lab container (reached via the Gateway at /lab//) — same // build, same code, split purely by the URL path at runtime. See // docs/PHASE2B_ADMIN_AND_PLATFORM_DATA.md "Student/admin flow" for why: it lets the existing // Lab UI () stay completely unmodified while the Platform Shell and Admin Portal live // alongside it in the same bundle. const path = window.location.pathname const view = path.startsWith('/lab/') ? 'lab' : path.startsWith('/admin') ? 'admin' : 'platform' ReactDOM.createRoot(document.getElementById('root')).render( {view === 'lab' ? : view === 'admin' ? : } )