-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.tsx
More file actions
executable file
·37 lines (33 loc) · 1.04 KB
/
App.tsx
File metadata and controls
executable file
·37 lines (33 loc) · 1.04 KB
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
34
35
36
37
import { Container } from '@mui/material'
import Grid from '@mui/material/Grid2'
import { Outlet, useLocation } from 'react-router-dom'
import { NavBar } from './components/NavBar'
import { Notification, NotificationContextProvider } from './components/Notification'
import { Footer } from './Footer'
import { useEffect } from 'react'
import { trackPageView } from './util/analytics'
const App = () => {
const location = useLocation()
useEffect(() => {
trackPageView(`${location.pathname}${location.search}`)
}, [location.pathname, location.search])
return (
<NotificationContextProvider>
<Notification />
<div id="wrapper">
<Grid container direction="column">
<Grid size={12}>
<NavBar />
</Grid>
<Container maxWidth="xl" fixed style={{ marginTop: '2em', marginBottom: '2em' }}>
<Grid size={12}>
<Outlet />
</Grid>
</Container>
</Grid>
<Footer />
</div>
</NotificationContextProvider>
)
}
export default App