From 8bebf974e1d6ef89025eb4bed2ac80617a0aa673 Mon Sep 17 00:00:00 2001 From: britea Date: Fri, 13 Mar 2020 15:12:28 +0100 Subject: [PATCH] fix and updated Dashboard and Routes --- smart-hut/src/views/Dashboard.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/smart-hut/src/views/Dashboard.js b/smart-hut/src/views/Dashboard.js index 8caa9b7..c27746f 100644 --- a/smart-hut/src/views/Dashboard.js +++ b/smart-hut/src/views/Dashboard.js @@ -1,11 +1,13 @@ import React, {Component} from 'react'; import DevicePanel from "../components/dashboard/DevicePanel"; +import NavbarTest from './NavbarTest' +import MyHeader from '../components/HeaderController' import { call } from '../client_server'; import {Button} from 'semantic-ui-react'; import { Menu } from 'semantic-ui-react' import { Grid, Image, Icon } from 'semantic-ui-react' -import NavbarTest from './NavbarTest' + export default class Dashboard extends Component{ constructor(props) { @@ -19,7 +21,7 @@ export default class Dashboard extends Component{ this.handleItemClick = this.handleItemClick.bind(this); } - UNSAFE_componentWillMount() { + componentDidMount() { call.getAllRooms(this.props.token) .then(res => { res.data.forEach((e) => { @@ -60,19 +62,17 @@ export default class Dashboard extends Component{ render () { return( -
- - - +
+ + + - + - +