From cfdbbc9cdb8069604a45616eb3d3c86053fd1625 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Wed, 13 May 2020 18:40:23 +0300 Subject: [PATCH] menu and change language button --- src/components/common/Header.js | 128 +++++++++++++++++++++++++++----- 1 file changed, 110 insertions(+), 18 deletions(-) diff --git a/src/components/common/Header.js b/src/components/common/Header.js index d66effd..ed40f05 100644 --- a/src/components/common/Header.js +++ b/src/components/common/Header.js @@ -1,27 +1,119 @@ -import React from "react"; +import React, { useState } from "react"; +import { makeStyles } from "@material-ui/core/styles"; +import AppBar from "@material-ui/core/AppBar"; +import Toolbar from "@material-ui/core/Toolbar"; +import Typography from "@material-ui/core/Typography"; +import IconButton from "@material-ui/core/IconButton"; +import MenuIcon from "@material-ui/icons/Menu"; +import LanguageIcon from "@material-ui/icons/Language"; +import MenuItem from "@material-ui/core/MenuItem"; +import Menu from "@material-ui/core/Menu"; import { NavLink } from "react-router-dom"; +import { Container } from "@material-ui/core"; +import { useTranslation } from "react-i18next"; + +const useStyles = makeStyles((theme) => ({ + root: { + flexGrow: 1 + }, + menuButton: { + marginRight: theme.spacing(2) + }, + title: { + flexGrow: 1 + } +})); const Header = () => { + const classes = useStyles(); + const { t, i18n } = useTranslation(); + + const [anchorEl, setAnchorEl] = useState(null); + const open = Boolean(anchorEl); + const activeStyle = { color: "#F15B2A" }; + const handleMenu = (event) => { + setAnchorEl(event.currentTarget); + }; + + const handleClose = () => { + setAnchorEl(null); + }; + + const changeLanguage = (language) => () => { + i18n.changeLanguage(language); + setAnchorEl(null); + }; + return ( - +
+ + + + + + + + + Reverse proxy + + + + Home + + {" | "} + + Courses + + {" | "} + + Sessions + + {" | "} + + About + + + +
+ + + + + + Romana + English + +
+
+
+
); };