mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-31 10:58:04 +08:00
21 lines
441 B
TypeScript
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
|
|
}
|
|
}
|