-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVasagatanTracker.js
47 lines (42 loc) · 1.28 KB
/
VasagatanTracker.js
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
38
39
40
41
42
43
44
45
46
47
import React from 'react';
import Year from './pages/Year';
import { HashRouter as Router, Route, Routes, Navigate } from 'react-router-dom';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import { blueGrey } from '@mui/material/colors';
import CssBaseline from '@mui/material/CssBaseline';
const theme = createTheme({
palette: {
primary: {
main: '#ff6cac',
contrastText: '#000'
},
secondary: blueGrey,
},
typography: {
useNextVariants: true,
}
});
class VasagatanTracker extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
const state = this.props.store.getState();
const year = state.activeYear;
return (
<div>
<CssBaseline />
<ThemeProvider theme={theme}>
<Router>
<Routes>
<Route path='/' element={<Navigate to={`/year/${year}`}/>}/>
<Route path='/year/:year/*' element={<Year store={this.props.store}/>}/>
</Routes>
</Router>
</ThemeProvider>
</div>
);
}
}
export default VasagatanTracker;