-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
26 lines (22 loc) · 848 Bytes
/
index.tsx
File metadata and controls
26 lines (22 loc) · 848 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
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { AuthProvider } from './contexts/AuthContext';
import { GoogleOAuthProvider } from '@react-oauth/google';
const rootElement = document.getElementById('root');
if (!rootElement) {
throw new Error("Could not find root element to mount to");
}
// In a real production environment, this should be in a .env file (e.g. process.env.GOOGLE_CLIENT_ID)
// Using the provided Client ID for this session.
const GOOGLE_CLIENT_ID = "257465215720-gc54qsupropia6opgvtmsnbdkmjer8h8.apps.googleusercontent.com";
const root = ReactDOM.createRoot(rootElement);
root.render(
<React.StrictMode>
<GoogleOAuthProvider clientId={GOOGLE_CLIENT_ID}>
<AuthProvider>
<App />
</AuthProvider>
</GoogleOAuthProvider>
</React.StrictMode>
);