mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-06 15:03:26 +00:00
27 lines
650 B
JavaScript
27 lines
650 B
JavaScript
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
import ReactDOM from "react-dom/client";
|
|
import { BrowserRouter } from "react-router-dom";
|
|
import App from "./App.jsx";
|
|
import "./index.css";
|
|
|
|
// Create a client for React Query
|
|
const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
refetchOnWindowFocus: false,
|
|
retry: 1,
|
|
staleTime: 5 * 60 * 1000, // 5 minutes
|
|
},
|
|
},
|
|
});
|
|
|
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
|
<React.StrictMode>
|
|
<BrowserRouter>
|
|
<QueryClientProvider client={queryClient}>
|
|
<App />
|
|
</QueryClientProvider>
|
|
</BrowserRouter>
|
|
</React.StrictMode>,
|
|
);
|