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: "" } } showForm = (event) => { console.log(event.target.name); if (event === "new"){ console.log("funziona"); return () } } handleClick = (e, { i }) => { this.setState({ activeItem: e.name, edited: i }); this.props.handleItemClick(e) } render(){ const { activeItem } = this.state return (
Home {this.props.rooms ? this.props.rooms.map((e, i) => { return ( {e.name} ) }) : null } //dropdown menu
); } } export default Navbar;