fix and updated Dashboard and Routes
This commit is contained in:
parent
b60a7bdcd0
commit
8bebf974e1
1 changed files with 10 additions and 10 deletions
|
@ -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,14 +62,12 @@ export default class Dashboard extends Component{
|
|||
|
||||
render () {
|
||||
return(
|
||||
<div style={{height : "110vh"}}>
|
||||
<Button color='blue' fluid size='large' onClick={this.addRoom}>
|
||||
Add Room
|
||||
</Button>
|
||||
<div style={{height : "110vh", background: '#1b1c1d'}}>
|
||||
<MyHeader />
|
||||
<Grid >
|
||||
<Grid.Row>
|
||||
<Grid.Row color='black'>
|
||||
<Grid.Column width={3}>
|
||||
<NavbarTest rooms={this.state.rooms} handleItemClick={this.handleItemClick}/>
|
||||
<NavbarTest addRoom={this.addRoom} rooms={this.state.rooms} handleItemClick={this.handleItemClick}/>
|
||||
</Grid.Column>
|
||||
|
||||
<Grid.Column width={13}>
|
||||
|
|
Loading…
Reference in a new issue