components
1 month ago
images
1 year ago
types
1 month ago
utils
1 year ago
App.tsx
1 month ago
index.tsx
1 year ago
index.tsx
31 lines
| 1 | import React from "react"; |
| 2 | import { createRoot } from "react-dom/client"; |
| 3 | import App from "./App"; |
| 4 | import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; |
| 5 | import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; |
| 6 | |
| 7 | // Create a client |
| 8 | const queryClient = new QueryClient({ |
| 9 | defaultOptions: { |
| 10 | queries: { |
| 11 | refetchOnWindowFocus: false, |
| 12 | refetchOnReconnect: false, |
| 13 | retry: false, |
| 14 | }, |
| 15 | }, |
| 16 | }); |
| 17 | |
| 18 | // Render the app |
| 19 | (() => { |
| 20 | const root = createRoot( |
| 21 | document.getElementById("evf-templates") as HTMLElement |
| 22 | ); |
| 23 | |
| 24 | root.render( |
| 25 | <QueryClientProvider client={queryClient}> |
| 26 | <App /> |
| 27 | <ReactQueryDevtools initialIsOpen={false} /> |
| 28 | </QueryClientProvider> |
| 29 | ); |
| 30 | })(); |
| 31 |