import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { RouterProvider } from '@tanstack/react-router'; import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import { SessionProvider } from '#/lib/session.jsx'; import { applyTheme, themeId } from '#/lib/theme.js'; import { createAppRouter } from '#/router.jsx'; import './style.css'; // Paint in the remembered palette before the first frame, so a reader who // chose one does not watch the page change colour under them. applyTheme(themeId()); // Every read is of an immutable object: a tree, a blob, or a commit, named by // a ref that only a push moves. Nothing here goes stale while the tab is // open, so a view already visited comes back without touching the network. const queryClient = new QueryClient({ defaultOptions: { queries: { staleTime: Number.POSITIVE_INFINITY, retry: false, refetchOnWindowFocus: false, }, }, }); const router = createAppRouter(queryClient); createRoot(document.getElementById('root')).render( , );