diff options
author | ditoaugusta <dt_ap@ymail.com> | 2020-03-28 02:38:14 +0700 |
---|---|---|
committer | ditoaugusta <dt_ap@ymail.com> | 2020-03-28 02:38:14 +0700 |
commit | 84da0d600ce4b048615b7e6a502c4feea9902eed (patch) | |
tree | 090c13739d1b64e23ea2e8d68f7e762c88c77447 | |
parent | 8f74f238634f4779b0ada63b52b10a030d352899 (diff) | |
download | trackermap-web-84da0d600ce4b048615b7e6a502c4feea9902eed.tar.gz trackermap-web-84da0d600ce4b048615b7e6a502c4feea9902eed.tar.bz2 trackermap-web-84da0d600ce4b048615b7e6a502c4feea9902eed.zip |
fix: jsx lines
-rw-r--r-- | modern/src/MainPage.js | 38 | ||||
-rw-r--r-- | modern/src/MainToolbar.js | 200 |
2 files changed, 121 insertions, 117 deletions
diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js index f6dd7fea..43625691 100644 --- a/modern/src/MainPage.js +++ b/modern/src/MainPage.js @@ -53,26 +53,28 @@ const MainPage = () => { }); }, [history]); - return (loading ? (<div>Loading...</div>) : (<div className={classes.root}> - <SocketController /> - <MainToobar /> - <div className={classes.content}> - { /* <Drawer - anchor={isWidthUp('sm', this.props.width) ? "left" : "bottom"} NOTE: What's this do? - variant="permanent" - classes={{ paper: classes.drawerPaper }}> */} - <Drawer - variant="permanent" - classes={{ paper: classes.drawerPaper }}> - <DeviceList /> - </Drawer> - <div className={classes.mapContainer}> - <ContainerDimensions> - <MainMap /> - </ContainerDimensions> + return loading ? (<div>Loading...</div>) : ( + <div className={classes.root}> + <SocketController /> + <MainToobar /> + <div className={classes.content}> + {/* <Drawer + anchor={isWidthUp('sm', this.props.width) ? "left" : "bottom"} NOTE: What's this do? + variant="permanent" + classes={{ paper: classes.drawerPaper }}> */} + <Drawer + variant="permanent" + classes={{ paper: classes.drawerPaper }}> + <DeviceList /> + </Drawer> + <div className={classes.mapContainer}> + <ContainerDimensions> + <MainMap /> + </ContainerDimensions> + </div> </div> </div> - </div>)); + ); } export default MainPage; diff --git a/modern/src/MainToolbar.js b/modern/src/MainToolbar.js index 9c2e811b..bf4aa402 100644 --- a/modern/src/MainToolbar.js +++ b/modern/src/MainToolbar.js @@ -51,106 +51,108 @@ const MainToolbar = () => { }) } - return (<> - <AppBar position="static" className={classes.appBar}> - <Toolbar> - <IconButton - className={classes.menuButton} - color="inherit" - onClick={openDrawer}> - <MenuIcon /> - </IconButton> - <Typography variant="h6" color="inherit" className={classes.flex}> - Traccar + return ( + <> + <AppBar position="static" className={classes.appBar}> + <Toolbar> + <IconButton + className={classes.menuButton} + color="inherit" + onClick={openDrawer}> + <MenuIcon /> + </IconButton> + <Typography variant="h6" color="inherit" className={classes.flex}> + Traccar </Typography> - <Button color="inherit" onClick={handleLogout}>{t('loginLogout')}</Button> - </Toolbar> - </AppBar> - <Drawer open={drawer} onClose={closeDrawer}> - <div - tabIndex={0} - className={classes.list} - role="button" - onClick={closeDrawer} - onKeyDown={closeDrawer}> - <List> - <ListItem button onClick={() => history.push('/')}> - <ListItemIcon> - <DashboardIcon /> - </ListItemIcon> - <ListItemText primary={t('mapTitle')} /> - </ListItem> - </List> - <Divider /> - <List subheader={<ListSubheader> - {t('reportTitle')} - </ListSubheader>}> - <ListItem button onClick={() => { history.push('/reports/route') }}> - <ListItemIcon> - <BarChartIcon /> - </ListItemIcon> - <ListItemText primary={t('reportRoute')} /> - </ListItem> - <ListItem button disabled> - <ListItemIcon> - <BarChartIcon /> - </ListItemIcon> - <ListItemText primary={t('reportEvents')} /> - </ListItem> - <ListItem button disabled> - <ListItemIcon> - <BarChartIcon /> - </ListItemIcon> - <ListItemText primary={t('reportTrips')} /> - </ListItem> - <ListItem button disabled> - <ListItemIcon> - <BarChartIcon /> - </ListItemIcon> - <ListItemText primary={t('reportStops')} /> - </ListItem> - <ListItem button disabled> - <ListItemIcon> - <BarChartIcon /> - </ListItemIcon> - <ListItemText primary={t('reportSummary')} /> - </ListItem> - <ListItem button disabled> - <ListItemIcon> - <BarChartIcon /> - </ListItemIcon> - <ListItemText primary={t('reportChart')} /> - </ListItem> - </List> - <Divider /> - <List - subheader={ - <ListSubheader> - {t('settingsTitle')} - </ListSubheader> - }> - <ListItem button disabled> - <ListItemIcon> - <SettingsIcon /> - </ListItemIcon> - <ListItemText primary={t('settingsUser')} /> - </ListItem> - <ListItem button disabled> - <ListItemIcon> - <SettingsIcon /> - </ListItemIcon> - <ListItemText primary={t('settingsServer')} /> - </ListItem> - <ListItem button disabled> - <ListItemIcon> - <SettingsIcon /> - </ListItemIcon> - <ListItemText primary={t('sharedNotifications')} /> - </ListItem> - </List> - </div> - </Drawer> - </>); + <Button color="inherit" onClick={handleLogout}>{t('loginLogout')}</Button> + </Toolbar> + </AppBar> + <Drawer open={drawer} onClose={closeDrawer}> + <div + tabIndex={0} + className={classes.list} + role="button" + onClick={closeDrawer} + onKeyDown={closeDrawer}> + <List> + <ListItem button onClick={() => history.push('/')}> + <ListItemIcon> + <DashboardIcon /> + </ListItemIcon> + <ListItemText primary={t('mapTitle')} /> + </ListItem> + </List> + <Divider /> + <List subheader={<ListSubheader> + {t('reportTitle')} + </ListSubheader>}> + <ListItem button onClick={() => { history.push('/reports/route') }}> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportRoute')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportEvents')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportTrips')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportStops')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportSummary')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <BarChartIcon /> + </ListItemIcon> + <ListItemText primary={t('reportChart')} /> + </ListItem> + </List> + <Divider /> + <List + subheader={ + <ListSubheader> + {t('settingsTitle')} + </ListSubheader> + }> + <ListItem button disabled> + <ListItemIcon> + <SettingsIcon /> + </ListItemIcon> + <ListItemText primary={t('settingsUser')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <SettingsIcon /> + </ListItemIcon> + <ListItemText primary={t('settingsServer')} /> + </ListItem> + <ListItem button disabled> + <ListItemIcon> + <SettingsIcon /> + </ListItemIcon> + <ListItemText primary={t('sharedNotifications')} /> + </ListItem> + </List> + </div> + </Drawer> + </> + ); } export default MainToolbar; |