mirror of https://github.com/gwuhaolin/livego.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
924 B
36 lines
924 B
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'; |
|
|
|
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}> |
|
<Router history={browserHistory}> |
|
<Routes /> |
|
</Router> |
|
</ThemeProvider> |
|
); |
|
} |
|
}
|
|
|