import { A, Route, Router } from "@solidjs/router"; import { For, type JSX, type ParentProps } from "solid-js"; import { DynamicExample } from "./pages/DynamicExample"; import { EventsExample } from "./pages/EventsExample"; import { Home } from "./pages/Home"; import { PanePrimitivesExample } from "./pages/PanePrimitivesExample"; import { PerformanceExample } from "./pages/PerformanceExample"; import { PriceChartExample } from "./pages/PriceChartExample"; import { SeriesPrimitivesExample } from "./pages/SeriesPrimitivesExample"; import { TimeChartExample } from "./pages/TimeChartExample"; import { TooltipExample } from "./pages/TooltipExample"; import { YieldCurveChartExample } from "./pages/YieldCurveChartExample"; type ExamplePage = { readonly path: string; readonly name: string; readonly component: () => JSX.Element; readonly category?: string; }; const examples: ExamplePage[] = [ { path: "/timechart", name: "TimeChart", component: TimeChartExample, category: "Core Charts", }, { path: "/pricechart", name: "PriceChart", component: PriceChartExample, category: "Core Charts", }, { path: "/yieldcurve", name: "YieldCurveChart", component: YieldCurveChartExample, category: "Core Charts", }, { path: "/events", name: "Chart Events", component: EventsExample, category: "Core Charts", }, { path: "/tooltip", name: "Tooltips", component: TooltipExample, category: "Core Charts", }, { path: "/series-primitives", name: "Series Primitives", component: SeriesPrimitivesExample, category: "Advanced Features", }, { path: "/pane-primitives", name: "Pane Primitives", component: PanePrimitivesExample, category: "Advanced Features", }, { path: "/dynamic", name: "Dynamic Management", component: DynamicExample, category: "Advanced Features", }, { path: "/performance", name: "Performance", component: PerformanceExample, category: "Advanced Features", }, ]; function Navigation() { const categories = [...new Set(examples.map((ex) => ex.category))]; return ( ); } function RootLayout(props: ParentProps) { return (