newsnow/src/main.ts
2024-09-29 20:57:24 +08:00

21 lines
441 B
TypeScript

import { QueryClient } from "@tanstack/react-query"
import { createRouter } from "@tanstack/react-router"
import { routeTree } from "./routeTree.gen"
export const queryClient = new QueryClient()
export const router = createRouter({
routeTree,
context: {
queryClient,
},
defaultPreload: "intent",
defaultPreloadStaleTime: 0,
})
declare module "@tanstack/react-router" {
interface Register {
router: typeof router
}
}