diff --git a/smart-hut/src/views/Navbar.js b/smart-hut/src/views/Navbar.js index 121d4b7..4123011 100644 --- a/smart-hut/src/views/Navbar.js +++ b/smart-hut/src/views/Navbar.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Menu, Grid, Icon, Button, Header, Image, Modal, Responsive, Segment } from "semantic-ui-react"; +import { Menu, Grid, Icon, Button, Header, Image, Modal, Responsive, Segment, Dropdown } from "semantic-ui-react"; import {editButtonStyle} from "../components/dashboard/devices/styleComponents"; import ModalWindow from "../components/modalform"; @@ -13,9 +13,7 @@ class Navbar extends Component { } } - editModeController = (e) => { - this.setState((prevState) => ({ editMode: !prevState.editMode })); - }; + editModeController = (e) => this.setState((prevState) => ({ editMode: !prevState.editMode })); handleClick = (e, {id}) => { console.log(id); @@ -29,7 +27,7 @@ class Navbar extends Component { return (
- + @@ -74,7 +72,7 @@ class Navbar extends Component { {e.name} - {this.state.edit ? + {this.state.editMode ? : null } @@ -102,9 +100,79 @@ class Navbar extends Component { + - //dropdown menu + + + + + + + + + + + + + Home + + + + + + {this.props.rooms ? + this.props.rooms.map((e, i) => { + return ( + + + + + + + + {e.name} + + + + + ) + }) : null + } + + + + + + + + + + + + + + + + + +
);