re-fix navbar and device panel

This commit is contained in:
britea 2020-03-18 13:20:01 +01:00
parent 50bc259990
commit 07edc884b9
2 changed files with 4 additions and 10 deletions

View file

@ -31,20 +31,16 @@ export default class Dashboard extends Component{
componentDidMount() {
call.getAllRooms(this.props.tkn)
.then(res => {
console.log(res.data.length);
res.data.forEach((e) => {
this.setState({
rooms: res.data
});
});
}).catch(err => {
console.log(err);
});
call.getAllDevices(this.props.tkn)
.then(res => {
console.log(res);
this.setState({
devices : res.data
devices: res.data
});
}).catch(err => {
console.log(err);
@ -79,11 +75,9 @@ export default class Dashboard extends Component{
//da fare richiesta get della room e settare activeItem
call.getAllDevicesByRoom(id, this.props.tkn)
.then(res => {
res.data.forEach((e) => {
this.setState({
devices: res.data
});
});
}).catch(err => {
console.log(err);
});