From 0512964d71a25c172735f2149ef60c3a8b20f683 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 10 Jul 2021 15:24:10 -0700 Subject: Use modified airbnb eslint --- modern/src/components/reports/ReportNavbar.js | 42 ++++++++++++++------------ modern/src/components/reports/ReportSidebar.js | 18 ++++++----- 2 files changed, 32 insertions(+), 28 deletions(-) (limited to 'modern/src/components/reports') diff --git a/modern/src/components/reports/ReportNavbar.js b/modern/src/components/reports/ReportNavbar.js index ac01fad..16807e8 100644 --- a/modern/src/components/reports/ReportNavbar.js +++ b/modern/src/components/reports/ReportNavbar.js @@ -1,26 +1,28 @@ import React from 'react'; -import { AppBar, Toolbar, Typography, IconButton } from '@material-ui/core'; +import { + AppBar, Toolbar, Typography, IconButton, +} from '@material-ui/core'; import MenuIcon from '@material-ui/icons/Menu'; import t from '../../common/localization'; -const ReportNavbar = ({ setOpenDrawer, reportTitle }) => { - - return ( - - - setOpenDrawer(true)}> - - - - {t('reportTitle')} {` / ${reportTitle}`} - - - - ) -} +const ReportNavbar = ({ setOpenDrawer, reportTitle }) => ( + + + setOpenDrawer(true)} + > + + + + {t('reportTitle')} + {' '} + {` / ${reportTitle}`} + + + +); export default ReportNavbar; diff --git a/modern/src/components/reports/ReportSidebar.js b/modern/src/components/reports/ReportSidebar.js index 90e20c0..686fc04 100644 --- a/modern/src/components/reports/ReportSidebar.js +++ b/modern/src/components/reports/ReportSidebar.js @@ -1,21 +1,23 @@ import React from 'react'; -import { List, ListItem, ListItemText, ListItemIcon } from '@material-ui/core'; +import { + List, ListItem, ListItemText, ListItemIcon, +} from '@material-ui/core'; import { Link, useLocation } from 'react-router-dom'; const ReportSidebar = ({ routes }) => { - const location = useLocation(); return ( - - {routes.map((route, index) => ( + + {routes.map((route) => ( + selected={route.href === location.pathname} + > {route.icon} @@ -23,7 +25,7 @@ const ReportSidebar = ({ routes }) => { ))} - ) -} + ); +}; export default ReportSidebar; -- cgit v1.2.3