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 React, {Component} from 'react';
|
||||||
import DevicePanel from "../components/dashboard/DevicePanel";
|
import DevicePanel from "../components/dashboard/DevicePanel";
|
||||||
|
import NavbarTest from './NavbarTest'
|
||||||
|
import MyHeader from '../components/HeaderController'
|
||||||
|
|
||||||
import { call } from '../client_server';
|
import { call } from '../client_server';
|
||||||
import {Button} from 'semantic-ui-react';
|
import {Button} from 'semantic-ui-react';
|
||||||
import { Menu } from 'semantic-ui-react'
|
import { Menu } from 'semantic-ui-react'
|
||||||
import { Grid, Image, Icon } from 'semantic-ui-react'
|
import { Grid, Image, Icon } from 'semantic-ui-react'
|
||||||
import NavbarTest from './NavbarTest'
|
|
||||||
|
|
||||||
export default class Dashboard extends Component{
|
export default class Dashboard extends Component{
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -19,7 +21,7 @@ export default class Dashboard extends Component{
|
||||||
this.handleItemClick = this.handleItemClick.bind(this);
|
this.handleItemClick = this.handleItemClick.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillMount() {
|
componentDidMount() {
|
||||||
call.getAllRooms(this.props.token)
|
call.getAllRooms(this.props.token)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
res.data.forEach((e) => {
|
res.data.forEach((e) => {
|
||||||
|
@ -60,14 +62,12 @@ export default class Dashboard extends Component{
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
return(
|
return(
|
||||||
<div style={{height : "110vh"}}>
|
<div style={{height : "110vh", background: '#1b1c1d'}}>
|
||||||
<Button color='blue' fluid size='large' onClick={this.addRoom}>
|
<MyHeader />
|
||||||
Add Room
|
<Grid >
|
||||||
</Button>
|
<Grid.Row color='black'>
|
||||||
<Grid>
|
|
||||||
<Grid.Row>
|
|
||||||
<Grid.Column width={3}>
|
<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>
|
||||||
|
|
||||||
<Grid.Column width={13}>
|
<Grid.Column width={13}>
|
||||||
|
|
Loading…
Reference in a new issue