2026-08-22 12:14:11 +02:00
|
|
|
import { StrictMode, Suspense, lazy } from 'react'
|
2026-08-14 12:43:11 +02:00
|
|
|
import { createRoot } from 'react-dom/client'
|
|
|
|
|
import { App } from './App'
|
|
|
|
|
import './styles.css'
|
|
|
|
|
|
2026-08-22 12:14:11 +02:00
|
|
|
// three.js is lazy-loaded so the board never pays for it up front.
|
|
|
|
|
const PhonePreview = lazy(() => import('./phone').then(m => ({ default: m.PhonePreview })))
|
|
|
|
|
|
|
|
|
|
// Visual spike: /?phone=1 renders the handset standalone, isolated from the board.
|
|
|
|
|
const root = new URLSearchParams(window.location.search).has('phone')
|
|
|
|
|
? <Suspense fallback={null}><PhonePreview /></Suspense>
|
|
|
|
|
: <App />
|
|
|
|
|
createRoot(document.getElementById('root')!).render(<StrictMode>{root}</StrictMode>)
|