diff options
Diffstat (limited to 'modern/src/RouteReportPage.js')
-rw-r--r-- | modern/src/RouteReportPage.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/modern/src/RouteReportPage.js b/modern/src/RouteReportPage.js index 86eeaaa0..6bbf01ec 100644 --- a/modern/src/RouteReportPage.js +++ b/modern/src/RouteReportPage.js @@ -1,18 +1,19 @@ -import React, { Component } from 'react'; +import React from 'react'; import MainToobar from './MainToolbar'; import withStyles from '@material-ui/core/styles/withStyles'; import withWidth from '@material-ui/core/withWidth'; +import { useHistory } from 'react-router-dom'; const styles = theme => ({}); -class RouteReportPage extends Component { - render() { - return ( - <div> - <MainToobar history={this.props.history} /> - </div> - ); - } +const RouteReportPage = () => { + const history = useHistory(); + + return ( + <div> + <MainToobar history={history} /> + </div> + ); } export default withWidth()(withStyles(styles)(RouteReportPage)); |