import React, { Suspense } from 'react' import ReactDOM from 'react-dom/client' import { BrowserRouter, Routes, Route, useParams } from 'react-router-dom' import { ContentProvider } from './cms/store' import { PAGES } from './cms/pages' // Lazy-loaded so each area's CSS stays isolated: // the site's global stylesheet only loads on site routes, never on the demo pages. const SiteApp = React.lazy(() => import('./site/SiteApp')) const DemoScreen = React.lazy(() => import('./demo/DemoScreen')) const DemoVideoPage = React.lazy(() => import('./demo/DemoVideoPage')) const ThreatDemosSlider = React.lazy(() => import('./demo/threats/ThreatDemosSlider')) const ThreatDemoPlayerPage = React.lazy(() => import('./demo/threats/ThreatDemoPlayerPage')) const LocationDemo = React.lazy(() => import('./demo/location/LocationDemo')) const AdminApp = React.lazy(() => import('./cms/admin/AdminApp')) function ArticleRoute() { const { slug } = useParams() return } ReactDOM.createRoot(document.getElementById('root')!).render( }> {/* Threat-detection demo slider + per-scenario players */} } /> } /> {/* Location / geofencing demo — safe-zone creation + leave-zone alert */} } /> {/* Cinematic product video — its own page */} } /> {/* Full interactive demo player (Flows A–D, ?mode=video) */} } /> {/* The CMS. Content is fetched inside, so it sits outside ContentProvider. */} }> } /> {/* The marketing site: one real URL per page, plus one per article. */} {PAGES.map((page) => ( } /> ))} } /> {/* Legacy hash-era and mistyped URLs still land on a working page. */} } /> } /> } /> } /> , )