From df4db30c7207df474f5da34969b3218ab30c94fc Mon Sep 17 00:00:00 2001 From: fbruc03 <65135023+fbruc03@users.noreply.github.com> Date: Fri, 10 Feb 2023 13:56:01 +0100 Subject: [PATCH] navbar only on root and md breakpoint --- src/components/Navbar.js | 275 +++++++++++++++++---------------------- 1 file changed, 120 insertions(+), 155 deletions(-) diff --git a/src/components/Navbar.js b/src/components/Navbar.js index 954af1b..3897e7c 100644 --- a/src/components/Navbar.js +++ b/src/components/Navbar.js @@ -50,6 +50,7 @@ import MenuItem from '@mui/material/MenuItem' import Menu from '@mui/material/Menu' import { setLanguage } from "../actions/generalActions"; import { setBoard } from "../actions/boardAction"; +import { Button } from "@mui/material"; const styles = (theme) => ({ drawerWidth: { @@ -140,163 +141,128 @@ class Navbar extends Component { senseBox-Logo -
-
- { - this.props.selectedBoard === "mcu" ? - ( - - ) : ( - + { + this.setState({ anchorElBoard: null }); + }} + > + { + this.props.setBoard(event.currentTarget.getAttribute("value")); + this.setState({ anchorElBoard: null }); }} > - - mini - - + mcu + + { + this.props.setBoard(event.currentTarget.getAttribute("value")); + this.setState({ anchorElBoard: null }); + }} + > + mini + + +
+
+ { + this.props.language === "en_US" ? + ( + + ) : ( + - ) - } - { - this.setState({ anchorElBoard: null }); - }} - > - { - this.props.setBoard(event.currentTarget.getAttribute("value")); - this.setState({ anchorElBoard: null }); - }} - > - MCU - - { - this.props.setBoard(event.currentTarget.getAttribute("value")); - this.setState({ anchorElBoard: null }); - }} - > - mini - - -
-
- { - this.props.language === "en_US" ? - ( - - ) : ( - - - ) - } - { - this.setState({ anchorElLang: null }); - }} - > - { - this.props.setLanguage(event.currentTarget.getAttribute("value")); - this.setState({ anchorElLang: null }); - }} - > - Deutsch - - { - this.props.setLanguage(event.currentTarget.getAttribute("value")); - this.setState({ anchorElLang: null }); - }} - > - English - - -
+ Deutsch + + { + this.props.setLanguage(event.currentTarget.getAttribute("value")); + this.setState({ anchorElLang: null }); + }} + > + English + + +
+ + ) : (null)} {isHome ? ( { this.setState({ anchorElUser: event.target }) }} - style={{ margin: "0 30px 0 auto" }} + style={{ margin: "0 30px 0 0" }} size="large" - sx={{ display: { xs: 'none', md: 'block' } }} > @@ -388,7 +353,7 @@ class Navbar extends Component { (