import React, { Component } from "react"; import MoreVertIcon from "@material-ui/icons/MoreVert"; import ArrowForwardIcon from "@material-ui/icons/ArrowForward"; import Menu from "@material-ui/core/Menu"; import MenuItem from "@material-ui/core/MenuItem"; import VideocamIcon from "@material-ui/icons/Videocam"; import StatusAvatar from "./Avatar/index.js"; import CallIcon from "@material-ui/icons/Call"; import { connect } from "react-redux"; import "./index.scss"; class Header extends Component { constructor(props) { super(props); this.state = { anchorEl: null, }; } handleClick = (event) => { this.setState({ anchorEl: event.currentTarget, }); }; handleClose = () => { this.setState({ anchorEl: null, }); }; back = () => { window.history.back(); }; render() { const { page, setPage, chatInfo } = this.props; const { anchorEl } = this.state; return (
page === "chatroom" ? this.back() : setPage("chatroom") } style={{ color: "white", width: 29, height: 29, marginTop: 4 }} />
setPage("info")} className="chat-header__info d-flex mr-1" >

{chatInfo ? chatInfo.title : null}

{chatInfo ? chatInfo.subTitle : null}
{/* */}
this.handleClose()} className="fontLight rtl" > this.handleClose()} > پروفایل this.handleClose()} > حساب کاربری this.handleClose()} > خروج
); } } export default connect((state) => ({ chatInfo: state.chat.info }), {})(Header);