forked from mtliendo/fullstack-postconfirmation-trigger
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.tsx
More file actions
33 lines (33 loc) · 942 Bytes
/
main.tsx
File metadata and controls
33 lines (33 loc) · 942 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
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { BrowserRouter, Route, Routes } from 'react-router'
import './index.css'
import Home from './pages/Home.tsx'
import { SecondaryPage } from './pages/Secondary.tsx'
import Navbar from './components/Navbar.tsx'
import Footer from './components/Footer.tsx'
import { Authenticator } from '@aws-amplify/ui-react'
import { Protect } from './components/Protect.tsx'
import ConfigureAmplify from './components/ConfigureAmplify.tsx'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<ConfigureAmplify />
<Authenticator.Provider>
<BrowserRouter>
<Navbar />
<Routes>
<Route path="/" element={<Home />} />
<Route
path="/secondary"
element={
<Protect>
<SecondaryPage />
</Protect>
}
/>
</Routes>
<Footer />
</BrowserRouter>
</Authenticator.Provider>
</StrictMode>
)