Files
Charon/frontend/src/main.tsx
GitHub Actions 09320a74ed feat: implement bulk ACL application feature for efficient access list management across multiple proxy hosts
feat: add modular Security Dashboard implementation plan with environment-driven security service activation
fix: update go.mod and go.sum for dependency version upgrades and optimizations
feat: enable gzip compression for API responses to reduce payload size
fix: optimize SQLite connection settings for better performance and concurrency
refactor: enhance RequireAuth component with consistent loading overlay
feat: configure global query client with optimized defaults for performance in main.tsx
refactor: replace health check useEffect with React Query for improved caching and auto-refresh
build: add code splitting in vite.config.ts for better caching and parallel loading
2025-12-05 18:45:18 +00:00

30 lines
971 B
TypeScript

import React from 'react'
import ReactDOM from 'react-dom/client'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import App from './App.tsx'
import { ThemeProvider } from './context/ThemeContext'
import './index.css'
// Global query client with optimized defaults for performance
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 1000 * 30, // 30 seconds - reduces unnecessary refetches
gcTime: 1000 * 60 * 5, // 5 minutes garbage collection
refetchOnWindowFocus: false, // Prevents refetch when switching tabs
refetchOnReconnect: 'always', // Refetch when network reconnects
retry: 1, // Only retry failed requests once
},
},
})
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<QueryClientProvider client={queryClient}>
<ThemeProvider>
<App />
</ThemeProvider>
</QueryClientProvider>
</React.StrictMode>,
)