import { lazy, Suspense } from 'react'; import { Link, Route, Routes, useLocation } from 'react-router-dom'; import SearchPage from './pages/SearchPage'; import ModPage from './pages/ModPage'; import ModHeader from './components/ModHeader'; // The full-setup view and the bgm/tabletop pages pull in the whole three.js // stack (Scene + all mesh viewers + @tts/tabletop). Lazy-load them so that // stack stays code-split out of the main bundle and is only fetched when one // of those routes is actually visited. const FullSetupPage = lazy(() => import('./pages/FullSetupPage')); const BgmPage = lazy(() => import('./pages/BgmPage')); const BgmPackagePage = lazy(() => import('./pages/BgmPackagePage')); const PartsPage = lazy(() => import('./pages/PartsPage')); const PartPage = lazy(() => import('./pages/PartPage')); const SurfacesPage = lazy(() => import('./pages/SurfacesPage')); const SurfacePage = lazy(() => import('./pages/SurfacePage')); const SetupsPage = lazy(() => import('./pages/SetupsPage')); const SetupPage = lazy(() => import('./pages/SetupPage')); export default function App() { const pathname = useLocation().pathname; const isModRoute = pathname.startsWith('/mod/'); // The inspector view is full-bleed/viewport-height; the setup sub-route keeps the standard centered layout. const isModView = /^\/mod\/[^/]+$/.test(pathname); return (