-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.tsx
More file actions
33 lines (31 loc) · 1009 Bytes
/
index.tsx
File metadata and controls
33 lines (31 loc) · 1009 Bytes
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
// @author: Albert C | @yz9yt | github.com/yz9yt
// index.tsx
// version 0.1 Beta
import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import App from './App.tsx';
import { ChatProvider } from './contexts/ChatContext.tsx';
import { AnalysisProvider } from './contexts/AnalysisContext.tsx';
import { SettingsProvider } from './contexts/SettingsProvider.tsx';
import { ErrorBoundary } from './components/ErrorBoundary.tsx';
const rootElement = document.getElementById('root');
if (!rootElement) {
throw new Error("Could not find root element to mount to");
}
const root = ReactDOM.createRoot(rootElement);
root.render(
<React.StrictMode>
<ErrorBoundary>
<BrowserRouter>
<SettingsProvider>
<ChatProvider>
<AnalysisProvider>
<App />
</AnalysisProvider>
</ChatProvider>
</SettingsProvider>
</BrowserRouter>
</ErrorBoundary>
</React.StrictMode>
);