-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathApp.js
43 lines (37 loc) · 1.09 KB
/
App.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
import React, { Component } from "react";
import { Router } from "react-router-dom";
import { createBrowserHistory } from "history";
import { Chart } from "react-chartjs-2";
import { ThemeProvider } from "@material-ui/styles";
import validate from "validate.js";
import { chartjs } from "./helpers";
import theme from "./theme";
import "react-perfect-scrollbar/dist/css/styles.css";
import "./assets/scss/index.scss";
import validators from "./common/validators";
import Routes from "./Routes";
import { CssBaseline } from "@material-ui/core";
//global store
import { StoreProvider } from "./store/store";
const browserHistory = createBrowserHistory();
Chart.helpers.extend(Chart.elements.Rectangle.prototype, {
draw: chartjs.draw
});
validate.validators = {
...validate.validators,
...validators
};
export default class App extends Component {
render() {
return (
<ThemeProvider theme={theme}>
<CssBaseline />
<StoreProvider>
<Router history={browserHistory}>
<Routes />
</Router>
</StoreProvider>
</ThemeProvider>
);
}
}