The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { createRouter, RouterHistory } from "@tanstack/react-router"; |
| 2 | |
| 3 | import { routeTree } from "./routeTree.gen"; |
| 4 | |
| 5 | export function getRouter(history: RouterHistory) { |
| 6 | return createRouter({ |
| 7 | routeTree, |
| 8 | history, |
| 9 | context: {}, |
| 10 | defaultPreload: "intent", |
| 11 | }); |
| 12 | } |
| 13 | |
| 14 | export type AppRouter = ReturnType<typeof getRouter>; |
| 15 | |
| 16 | declare module "@tanstack/react-router" { |
| 17 | interface Register { |
| 18 | router: AppRouter; |
| 19 | } |
| 20 | } |