-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tsx
33 lines (26 loc) · 855 Bytes
/
main.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { ThemeProvider } from '@emotion/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { createRoot } from 'react-dom/client';
import App from './App';
import theme from 'styles/theme';
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
},
},
});
// async function enableMocking() {
// if (import.meta.env.MODE !== 'development') return;
// const { worker } = await import('./mocks/browser');
// return worker.start();
// }
createRoot(document.getElementById('root')!).render(
<QueryClientProvider client={queryClient}>
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
<ReactQueryDevtools initialIsOpen={false} />
</QueryClientProvider>
);