-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
46 lines (43 loc) · 1.54 KB
/
index.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
34
35
36
37
38
39
40
41
42
43
44
45
46
import { ApolloProvider } from '@apollo/client';
//import { MantineProvider } from '@mantine/core';
import { NotificationsProvider } from '@mantine/notifications';
import React from 'react';
//import { createRoot } from 'react-dom/client';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import App from './App';
import { store } from './redux/store';
import reportWebVitals from './reportWebVitals';
import api from './services/api';
// eslint-disable-next-line import/no-named-as-default-member
ReactDOM.render(
<React.StrictMode>
<Provider store={store}>
<ApolloProvider client={api}>
<NotificationsProvider>
<App />
</NotificationsProvider>
</ApolloProvider>
</Provider>
</React.StrictMode>,
document.getElementById('app')
);
// FIXME: The React 18 way. As you might have guessed, it doesn't work: https://github.com/apollographql/apollo-client/issues/9664
/*const container = document.getElementById('app');
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const root = createRoot(container!);
root.render(
<React.StrictMode>
<Provider store={store}>
<ApolloProvider client={api}>
<NotificationsProvider>
<App />
</NotificationsProvider>
</ApolloProvider>
</Provider>
</React.StrictMode>
);*/
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();