diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-07 14:40:45 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-07 14:40:45 +1200 |
commit | 06c4ee387669b1ccb5aa3928fbaa7c3650bfb7fa (patch) | |
tree | 76b9320815b51c242513a036c1fd2fc37082d5c7 /modern/src/MainPage.js | |
parent | 58b66d9a09d3128f96f8c42f0e271a2323581143 (diff) | |
download | trackermap-web-06c4ee387669b1ccb5aa3928fbaa7c3650bfb7fa.tar.gz trackermap-web-06c4ee387669b1ccb5aa3928fbaa7c3650bfb7fa.tar.bz2 trackermap-web-06c4ee387669b1ccb5aa3928fbaa7c3650bfb7fa.zip |
Implement WebSocket connection
Diffstat (limited to 'modern/src/MainPage.js')
-rw-r--r-- | modern/src/MainPage.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js index eaf3e40c..ce4c5771 100644 --- a/modern/src/MainPage.js +++ b/modern/src/MainPage.js @@ -4,6 +4,8 @@ import MainToobar from './MainToolbar'; import MainMap from './MainMap'; import Drawer from '@material-ui/core/Drawer'; import withStyles from '@material-ui/core/styles/withStyles'; +import SocketController from './SocketContoller'; +import withWidth, { isWidthUp } from '@material-ui/core/withWidth'; const styles = theme => ({ root: { @@ -64,9 +66,11 @@ class MainPage extends Component { } else { return ( <div className={classes.root}> + <SocketController /> <MainToobar history={this.props.history} /> <div className={classes.content}> <Drawer + anchor={isWidthUp('sm', this.props.width) ? "left" : "bottom"} variant="permanent" classes={{ paper: classes.drawerPaper }}> </Drawer> @@ -82,4 +86,4 @@ class MainPage extends Component { } } -export default withStyles(styles)(MainPage); +export default withWidth()(withStyles(styles)(MainPage)); |