diff options
Diffstat (limited to 'modern/src/DevicePage.js')
-rw-r--r-- | modern/src/DevicePage.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/modern/src/DevicePage.js b/modern/src/DevicePage.js index 73f1dc86..e882de37 100644 --- a/modern/src/DevicePage.js +++ b/modern/src/DevicePage.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 DevicePage extends Component { - render() { - return ( - <div> - <MainToobar history={this.props.history} /> - </div> - ); - } +const DevicePage = () => { + const history = useHistory(); + + return ( + <div> + <MainToobar history={history} /> + </div> + ); } export default withWidth()(withStyles(styles)(DevicePage)); |