import React, { Component } from 'react'; import { Menu, Grid, Icon, Button, Header, Image, Modal, Responsive, Segment } from "semantic-ui-react"; import {editButtonStyle} from "../components/dashboard/devices/styleComponents"; import ModalWindow from "../components/modalform"; class Navbar extends Component { constructor(props) { super(props); this.state = { activeItem: 'Home', edited: "", editMode : false } } editModeController = (e) => { this.setState((prevState) => ({ editMode: !prevState.editMode })); }; handleClick = (e, {id}) => { console.log(id); this.setState({ activeItem: id, }); this.props.handleItemClick(id) } render(){ //const { activeItem } = this.state return (
HOME {this.props.rooms ? this.props.rooms.map((e, i) => { return ( {e.name} {this.state.edit ? : null } ) }) : null } //dropdown menu
); } } export default Navbar;