Merge branch '40-re-fix-navbar-and-devicepanel' into 'dev'

re-fix navbar and device panel

Closes #40

See merge request sa4-2020/the-sanmarinoes/frontend!37
This commit is contained in:
Claudio Maggioni 2020-03-18 13:35:05 +01:00
commit 7faa63e484
2 changed files with 4 additions and 10 deletions

View file

@ -31,18 +31,14 @@ 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
});
@ -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);
});