-
Notifications
You must be signed in to change notification settings - Fork 0
/
Header.js
32 lines (28 loc) · 1.06 KB
/
Header.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React from "react";
import PersonIcon from "@material-ui/icons/Person";
import ForumIcon from "@material-ui/icons/Forum";
import "./Header.css";
import IconButton from "@material-ui/core/IconButton";
import {Link, useHistory} from "react-router-dom";
import ArrowBackIosIcon from "@material-ui/icons/ArrowBackIos";
function Header({backButton}){
const history = useHistory();
return (
<div className="header">
{backButton ? (<IconButton onClick={() => history.replace(backButton)}>
<ArrowBackIosIcon className="header__icon" fontSize="large" />
</IconButton>):
(<IconButton>
<PersonIcon className="header__icon" fontSize="large" />
</IconButton>)}
<Link to="/">
<img src = {"\Ensemble.png"} alt = "Logo"/>
</Link>
<Link to="/chat"> <IconButton>
<ForumIcon className="header__icon" fontSize="large"/>
</IconButton>
</Link>
</div>
);
}
export default Header;