router config changes

This commit is contained in:
yohlo
2025-08-26 22:47:25 -05:00
parent fcdb33a4b6
commit 75479be334
16 changed files with 87 additions and 101 deletions

View File

@@ -3,7 +3,7 @@ import { createRouter as createTanStackRouter } from '@tanstack/react-router'
import { routerWithQueryClient } from '@tanstack/react-router-with-query'
import { routeTree } from './routeTree.gen'
import { DefaultCatchBoundary } from '../components/DefaultCatchBoundary'
import { defaultHeaderConfig } from '@/features/core/hooks/use-header-config'
import { defaultHeaderConfig } from '@/features/core/hooks/use-router-config'
export function createRouter() {
const queryClient = new QueryClient({
@@ -21,7 +21,7 @@ export function createRouter() {
return routerWithQueryClient(
createTanStackRouter({
routeTree,
context: { queryClient, auth: undefined!, header: defaultHeaderConfig, refresh: { toRefresh: [] } },
context: { queryClient, auth: undefined!, header: defaultHeaderConfig, refresh: [], withPadding: true },
defaultPreload: 'intent',
defaultErrorComponent: DefaultCatchBoundary,
scrollRestoration: true,