mirror of
https://github.com/block/buzz.git
synced 2026-11-02 15:31:27 +00:00
18 lines
429 B
TypeScript
18 lines
429 B
TypeScript
import { createBrowserHistory, createRouter } from "@tanstack/react-router";
|
|
|
|
import { routeTree } from "@/app/routeTree.gen";
|
|
|
|
export const router = createRouter({
|
|
routeTree,
|
|
history: createBrowserHistory(),
|
|
scrollRestoration: true,
|
|
getScrollRestorationKey: (location: { pathname: string }) =>
|
|
location.pathname,
|
|
});
|
|
|
|
declare module "@tanstack/react-router" {
|
|
interface Register {
|
|
router: typeof router;
|
|
}
|
|
}
|