aboutsummaryrefslogtreecommitdiff
path: root/src/index.tsx
blob: 0ab06f5d094eab0eb3f5eee6f7be413ab3782a6d (plain)
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
48
49
import React from 'react';
import ReactDOM from 'react-dom';
import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';
import { CssBaseline } from '@material-ui/core';
import teal from '@material-ui/core/colors/teal';
import 'typeface-roboto';

import { SnackbarProvider } from 'notistack';
import Header from './components/Header/Header';
import ScrollTopArrow from './components/ScrollTopArrow/ScrollTopArrow';
import Page from './pages/Page';
import { AuthProvider } from './hooks/useAuth';
import { NavigationProvider } from './hooks/useNavigate';

const theme = createMuiTheme({
  palette: {
    primary: {
      main: teal[700],
      light: teal[100]
    }
  }
});


const App: React.FC = () => {
  return (
    <SnackbarProvider
      maxSnack={3}
      anchorOrigin={{
        vertical: 'bottom',
        horizontal: 'right'
      }}
    >
      <NavigationProvider>
        <AuthProvider>
          <ThemeProvider theme={theme}>
            <CssBaseline />
            <Header />
            <Page />
            <ScrollTopArrow />
          </ThemeProvider>
        </AuthProvider>
      </NavigationProvider>
    </SnackbarProvider>
  );
};

ReactDOM.render(<App />, document.getElementById('root'));