import { lazy, Suspense } from "react"; import { useHashRoute, navigateTo } from "../hashRouter"; const ModelApp = lazy(() => import("../model/ModelApp")); type TabId = "model"; const TABS: { id: TabId; label: string; color: string; activeClass: string }[] = [ { id: "model", label: "Model Trace", color: "blue", activeClass: "border-blue-500 text-blue-400" }, ]; const VALID_TABS = new Set(TABS.map(t => t.id)); export default function VisualizerApp() { const route = useHashRoute(); const activeTab: TabId = VALID_TABS.has(route.tab) ? (route.tab as TabId) : "model"; return (
{/* Visualizer tab bar */}
{TABS.map((tab) => ( ))}
{/* Active visualizer */}
Loading...
} > {activeTab === "model" && (
)}
); }