aboutsummaryrefslogtreecommitdiff
path: root/modern/src/DevicePage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-03-29 15:09:29 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-03-29 15:09:29 -0700
commit41ca114c886797c557c705ef90cc1b7491d16d4e (patch)
tree314208b2fb14cbe311120029064a117966e94b5c /modern/src/DevicePage.js
parent800da2aef77cd0e64d39b419929f7ac97db47f21 (diff)
downloadetbsa-traccar-web-41ca114c886797c557c705ef90cc1b7491d16d4e.tar.gz
etbsa-traccar-web-41ca114c886797c557c705ef90cc1b7491d16d4e.tar.bz2
etbsa-traccar-web-41ca114c886797c557c705ef90cc1b7491d16d4e.zip
Move more components to hooks
Diffstat (limited to 'modern/src/DevicePage.js')
-rw-r--r--modern/src/DevicePage.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/modern/src/DevicePage.js b/modern/src/DevicePage.js
index 73f1dc8..e882de3 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));