@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
tsx 47 lines 1.12 KB
Raw
1 import { RegistryProvider } from "@effect/atom-react";
2 import { HeadContent, Outlet, Scripts, createRootRoute } from "@tanstack/react-router";
3 import type { ReactNode } from "react";
4
5 export const Route = createRootRoute({
6 head: () => ({
7 meta: [
8 { charSet: "utf-8" },
9 { name: "viewport", content: "width=device-width, initial-scale=1" },
10 { title: "TanStack Start + Effect RPC + Drizzle" },
11 ],
12 }),
13 component: RootComponent,
14 });
15
16 function RootComponent() {
17 return (
18 <Document>
19 {/* One AtomRegistry for the whole app — every AtomRpc query/mutation
20 atom resolves against this registry. */}
21 <RegistryProvider>
22 <Outlet />
23 </RegistryProvider>
24 </Document>
25 );
26 }
27
28 function Document(props: Readonly<{ children: ReactNode }>) {
29 return (
30 <html lang="en">
31 <head>
32 <HeadContent />
33 </head>
34 <body
35 style={{
36 margin: 0,
37 fontFamily: "ui-sans-serif, system-ui, sans-serif",
38 background: "#f8fafc",
39 color: "#0f172a",
40 }}
41 >
42 {props.children}
43 <Scripts />
44 </body>
45 </html>
46 );
47 }