forked from finos/architecture-as-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
24 lines (21 loc) · 702 Bytes
/
index.tsx
File metadata and controls
24 lines (21 loc) · 702 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
import './index.css';
import React from 'react';
import ReactDOM from 'react-dom/client';
import ProtectedRoute from './ProtectedRoute.js';
import { isAuthServiceEnabled } from './authService.js';
import App from './App.js';
import { LogoutButton } from './components/logout-button/LogoutButton.js';
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
const isAuthenticationEnabled = isAuthServiceEnabled();
root.render(
<React.StrictMode>
{isAuthenticationEnabled ? (
<ProtectedRoute>
<App />
<LogoutButton />
</ProtectedRoute>
) : (
<App />
)}
</React.StrictMode>
);