fix(web): preserve route state and cancel stale reads

This commit is contained in:
lingniu
2026-07-16 00:29:47 +08:00
parent 53e1b57e86
commit 6506c0f1f0
21 changed files with 166 additions and 62 deletions

View File

@@ -4,6 +4,7 @@ import { AppShell } from './layout/AppShell';
import { AuthGate } from './auth/AuthGate';
import { RoutePage } from './routing/RouteBoundary';
import { RoutePages } from './routing/routeModules';
import { ROUTER_FUTURE } from './routing/routerConfig';
const queryClient = new QueryClient({
defaultOptions: {
@@ -19,7 +20,7 @@ const queryClient = new QueryClient({
export function AppV2() {
return (
<QueryClientProvider client={queryClient}>
<AuthGate><BrowserRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
<AuthGate><BrowserRouter future={ROUTER_FUTURE}>
<Routes>
<Route element={<AppShell />}>
<Route index element={<Navigate to="/monitor" replace />} />