mirror of
https://github.com/hansjone/netx.git
synced 2026-10-11 08:00:49 +08:00
Fix empty topology create-root and cut navigation loading flash.
Keep the hidden system root built-in; speed tree bootstrap, unblock new-root UI, and soften query/Suspense refetch jank. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
c4911b6ddc
commit
990798987b
8 changed files with 246 additions and 61 deletions
|
|
@ -9,7 +9,16 @@ import { I18nProvider } from "./i18n";
|
|||
import { ToastProvider } from "./hooks/useToast";
|
||||
import { AuthProvider } from "./auth/AuthContext";
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
// Avoid remount flash/jank on every navigation (default staleTime is 0).
|
||||
staleTime: 30_000,
|
||||
refetchOnWindowFocus: false,
|
||||
retry: 1,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue