import React, { Component } from "react"; import { withRouter } from "react-router-dom"; import "./adminMenu.scss"; import { adminMenu } from "../../state/adminMenu"; class AdminMenu extends Component { constructor(props) { super(props); this.state = {adminMenu}; } clickEventHandler = (e) => { const elem = adminMenu.find(el => el.id === +e.target.id) this.props.history.push(elem.path) } render(){ return(
{adminMenu.map(el => el.text !== "Log out" && el.text !== "Main Page" &&

{el.text.toUpperCase()}

{/* {el.text.toUpperCase()} */}
) }
) } } export default withRouter(AdminMenu)