Merge branch '30-fix-updated-dashboard-and-routes' into 'dev'
fix and updated Dashboard and Routes Closes #30 See merge request sa4-2020/the-sanmarinoes/frontend!22
This commit is contained in:
commit
d666b50d57
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,19 +62,17 @@ export default class Dashboard extends Component{
|
|||
|
||||
render () {
|
||||
return(
|
||||
<div style={{height : "110vh"}}>
|
||||
<Button color='blue' fluid size='large' onClick={this.addRoom}>
|
||||
Add Room
|
||||
</Button>
|
||||
<Grid>
|
||||
<Grid.Row>
|
||||
<div style={{height : "110vh", background: '#1b1c1d'}}>
|
||||
<MyHeader />
|
||||
<Grid >
|
||||
<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}>
|
||||
<DevicePanel />
|
||||
</Grid.Column>
|
||||
</Grid.Column>
|
||||
</Grid.Row>
|
||||
</Grid>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue