diff options
author | Desmond Kyeremeh <elDekyfin@gmail.com> | 2021-07-01 13:54:49 +0000 |
---|---|---|
committer | Desmond Kyeremeh <elDekyfin@gmail.com> | 2021-07-01 13:54:49 +0000 |
commit | 69d7c4feead09434914fdad109eb02e12c15cb89 (patch) | |
tree | 0f2f8c03c2a6d46e8cb82e3773ff669dce035443 /modern/src | |
parent | 36d05b64fbcd52760e023af227748b2efd74d21f (diff) | |
download | trackermap-web-69d7c4feead09434914fdad109eb02e12c15cb89.tar.gz trackermap-web-69d7c4feead09434914fdad109eb02e12c15cb89.tar.bz2 trackermap-web-69d7c4feead09434914fdad109eb02e12c15cb89.zip |
Abstract ReportNavBar into NavBar
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/components/NavBar.js | 23 | ||||
-rw-r--r-- | modern/src/components/reports/ReportNavbar.js | 26 |
2 files changed, 23 insertions, 26 deletions
diff --git a/modern/src/components/NavBar.js b/modern/src/components/NavBar.js new file mode 100644 index 00000000..68e38bf0 --- /dev/null +++ b/modern/src/components/NavBar.js @@ -0,0 +1,23 @@ +import React from 'react'; +import { AppBar, Toolbar, Typography, IconButton } from '@material-ui/core'; +import MenuIcon from '@material-ui/icons/Menu'; + +const Navbar = ({ setOpenDrawer, title }) => ( + <AppBar position="fixed" color="inherit"> + <Toolbar> + <IconButton + color="inherit" + aria-label="open drawer" + edge="start" + onClick={() => setOpenDrawer(true)} + > + <MenuIcon /> + </IconButton> + <Typography variant="h6" noWrap> + {title} + </Typography> + </Toolbar> + </AppBar> +); + +export default Navbar; diff --git a/modern/src/components/reports/ReportNavbar.js b/modern/src/components/reports/ReportNavbar.js deleted file mode 100644 index ac01fad9..00000000 --- a/modern/src/components/reports/ReportNavbar.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -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 ( - <AppBar position="fixed" color="inherit"> - <Toolbar> - <IconButton - color="inherit" - aria-label="open drawer" - edge="start" - onClick={() => setOpenDrawer(true)}> - <MenuIcon /> - </IconButton> - <Typography variant="h6" noWrap> - {t('reportTitle')} {` / ${reportTitle}`} - </Typography> - </Toolbar> - </AppBar> - ) -} - -export default ReportNavbar; |