The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { HeadContent, Outlet, Scripts, createRootRoute } from "@tanstack/react-router"; |
| 2 | /// <reference types="vite/client" /> |
| 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: "Alchemy Prisma TanStack Start" }, |
| 11 | { |
| 12 | name: "description", |
| 13 | content: "TanStack Start deployed to Prisma Compute with Alchemy", |
| 14 | }, |
| 15 | ], |
| 16 | }), |
| 17 | component: RootComponent, |
| 18 | notFoundComponent: NotFound, |
| 19 | }); |
| 20 | |
| 21 | function RootComponent() { |
| 22 | return ( |
| 23 | <RootDocument> |
| 24 | <Outlet /> |
| 25 | </RootDocument> |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | function RootDocument({ children }: Readonly<{ children: ReactNode }>) { |
| 30 | return ( |
| 31 | <html lang="en"> |
| 32 | <head> |
| 33 | <HeadContent /> |
| 34 | </head> |
| 35 | <body> |
| 36 | {children} |
| 37 | <Scripts /> |
| 38 | </body> |
| 39 | </html> |
| 40 | ); |
| 41 | } |
| 42 | |
| 43 | function NotFound() { |
| 44 | return ( |
| 45 | <main |
| 46 | style={{ |
| 47 | minHeight: "100vh", |
| 48 | display: "grid", |
| 49 | placeItems: "center", |
| 50 | fontFamily: |
| 51 | 'Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', |
| 52 | color: "#171923", |
| 53 | }} |
| 54 | > |
| 55 | <p>Not Found</p> |
| 56 | </main> |
| 57 | ); |
| 58 | } |