import React from "react"; import Link from "next/link"; export default class InnerMenu extends React.Component { constructor(props) { super(props); this.state = { type: undefined, finance: 0, additional: 0, fines:0, pts: 0, }; this.menuRef = React.createRef(); } _checkEventsCount = () => { const { events, types } = this.props; const count = { finance: 0, additional: 0, fines:0, pts: 0, }; for(let i in events) { count[types[events[i].event_type]]++; } return count; } render() { const { type } = this.props; const count = this._checkEventsCount(); return ( ) } }