Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: codex <[email protected]>
20 lines
396 B
TypeScript
20 lines
396 B
TypeScript
import { createRouter, RouterHistory } from "@tanstack/react-router";
|
|
|
|
import { routeTree } from "./routeTree.gen";
|
|
|
|
export function getRouter(history: RouterHistory) {
|
|
return createRouter({
|
|
routeTree,
|
|
history,
|
|
context: {},
|
|
});
|
|
}
|
|
|
|
export type AppRouter = ReturnType<typeof getRouter>;
|
|
|
|
declare module "@tanstack/react-router" {
|
|
interface Register {
|
|
router: AppRouter;
|
|
}
|
|
}
|