This repository was archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathApp.js
More file actions
executable file
·92 lines (81 loc) · 2.31 KB
/
App.js
File metadata and controls
executable file
·92 lines (81 loc) · 2.31 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import React, { useEffect } from 'react';
import { Router } from 'react-router-dom';
import { createBrowserHistory } from 'history';
import { create } from 'jss';
import rtl from 'jss-rtl';
import MomentUtils from '@date-io/moment';
import { SnackbarProvider } from 'notistack';
import {
createStyles,
jssPreset,
makeStyles,
StylesProvider,
ThemeProvider
} from '@material-ui/core';
import { MuiPickersUtilsProvider } from '@material-ui/pickers';
import Auth from 'src/components/auth/Auth';
import GoogleAnalytics from 'src/components/GoogleAnalytics';
import ScrollReset from 'src/components/ScrollReset';
import useSettings from 'src/hooks/useSettings';
import { createTheme } from 'src/theme';
import Routes from 'src/Routes';
import { library } from '@fortawesome/fontawesome-svg-core';
import { fab } from '@fortawesome/free-brands-svg-icons';
import { faEnvelope } from '@fortawesome/free-solid-svg-icons';
library.add(fab, faEnvelope);
const history = createBrowserHistory();
const jss = create({ plugins: [...jssPreset().plugins, rtl()] });
const tawkTo = require('tawkto-react');
const tawkToPropertyId = '5f6b99364704467e89f1b758';
const useStyles = makeStyles(() =>
createStyles({
'@global': {
'*': {
boxSizing: 'border-box',
margin: 0,
padding: 0
},
html: {
'-webkit-font-smoothing': 'antialiased',
'-moz-osx-font-smoothing': 'grayscale',
height: '100%',
width: '100%'
},
body: {
height: '100%',
width: '100%',
overflow: 'hidden',
color: '#000'
},
'#root': {
height: '100%',
width: '100%'
}
}
})
);
function App() {
useStyles();
useEffect(() => {
tawkTo(tawkToPropertyId);
}, []);
const { settings } = useSettings();
return (
<ThemeProvider theme={createTheme(settings)}>
<StylesProvider jss={jss}>
<MuiPickersUtilsProvider utils={MomentUtils}>
<SnackbarProvider maxSnack={1}>
<Router history={history}>
<Auth>
<ScrollReset />
<GoogleAnalytics />
<Routes />
</Auth>
</Router>
</SnackbarProvider>
</MuiPickersUtilsProvider>
</StylesProvider>
</ThemeProvider>
);
}
export default App;