2026-04-15 20:03:47 +02:00
|
|
|
import { MetaProvider, Title } from "@solidjs/meta";
|
|
|
|
|
import { Router } from "@solidjs/router";
|
|
|
|
|
import { FileRoutes } from "@solidjs/start/router";
|
|
|
|
|
import { ErrorBoundary, Suspense } from "solid-js";
|
|
|
|
|
import { AuthProvider } from "~/lib/auth";
|
|
|
|
|
import { AiChatWidget } from "~/components/AiChatWidget";
|
|
|
|
|
import "./app.css";
|
2026-03-16 23:46:21 +01:00
|
|
|
|
|
|
|
|
export default function App() {
|
|
|
|
|
return (
|
|
|
|
|
<Router
|
|
|
|
|
root={(props) => (
|
|
|
|
|
<MetaProvider>
|
|
|
|
|
<Title>NXTGAUGE Frontend Solid</Title>
|
2026-04-06 06:19:23 +02:00
|
|
|
<AuthProvider>
|
|
|
|
|
<ErrorBoundary
|
|
|
|
|
fallback={(err) => (
|
2026-04-15 20:03:47 +02:00
|
|
|
<main
|
|
|
|
|
style={{
|
|
|
|
|
padding: "24px",
|
|
|
|
|
"font-family": "Inter, system-ui, sans-serif",
|
|
|
|
|
color: "#111827",
|
|
|
|
|
background: "#fff",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<h1 style={{ margin: 0, "font-size": "20px" }}>Frontend Error</h1>
|
|
|
|
|
<p style={{ "margin-top": "8px" }}>
|
|
|
|
|
A runtime error occurred while rendering this page.
|
|
|
|
|
</p>
|
|
|
|
|
<pre
|
|
|
|
|
style={{
|
|
|
|
|
"margin-top": "12px",
|
|
|
|
|
padding: "12px",
|
|
|
|
|
background: "#f3f4f6",
|
|
|
|
|
"border-radius": "8px",
|
|
|
|
|
"white-space": "pre-wrap",
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-04-06 06:19:23 +02:00
|
|
|
{String((err as any)?.message || err)}
|
|
|
|
|
</pre>
|
|
|
|
|
</main>
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
<Suspense>{props.children}</Suspense>
|
2026-04-15 20:03:47 +02:00
|
|
|
<AiChatWidget />
|
2026-04-06 06:19:23 +02:00
|
|
|
</ErrorBoundary>
|
|
|
|
|
</AuthProvider>
|
2026-03-16 23:46:21 +01:00
|
|
|
</MetaProvider>
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
<FileRoutes />
|
|
|
|
|
</Router>
|
|
|
|
|
);
|
|
|
|
|
}
|