2022-09-15 15:37:02 +00:00
|
|
|
import { StrictMode } from 'react';
|
|
|
|
import { createRoot } from 'react-dom/client';
|
2022-10-18 07:58:44 +00:00
|
|
|
import { ThemeContext } from '@vegaprotocol/react-helpers';
|
|
|
|
import { EnvironmentProvider, NetworkLoader } from '@vegaprotocol/environment';
|
|
|
|
import { createClient } from './app/lib/apollo-client';
|
2022-09-15 15:37:02 +00:00
|
|
|
|
|
|
|
import App from './app/app';
|
|
|
|
|
|
|
|
const rootElement = document.getElementById('root');
|
|
|
|
const root = rootElement && createRoot(rootElement);
|
|
|
|
|
|
|
|
root?.render(
|
|
|
|
<StrictMode>
|
2022-10-18 07:58:44 +00:00
|
|
|
<EnvironmentProvider>
|
|
|
|
<ThemeContext.Provider value="light">
|
|
|
|
<NetworkLoader createClient={createClient}>
|
|
|
|
<App />
|
|
|
|
</NetworkLoader>
|
|
|
|
</ThemeContext.Provider>
|
|
|
|
</EnvironmentProvider>
|
2022-09-15 15:37:02 +00:00
|
|
|
</StrictMode>
|
|
|
|
);
|