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(