Merge branch '90-fix-devices' into 'dev'

Resolve "fix-devices"

Closes #90

See merge request sa4-2020/the-sanmarinoes/frontend!113
This commit is contained in:
Andrea Brites Marto 2020-05-02 17:05:11 +02:00
commit b99641125c
2 changed files with 3 additions and 2 deletions

View file

@ -98,7 +98,7 @@ class DeviceSettingsModal extends Component {
deleteDevice() { deleteDevice() {
this.props this.props
.deleteDevice(this.props.device) .deleteDevice(this.props.device)
.then(() => this.setState({ open: false })) .then(() => this.setState({ openModal: false }))
.catch((err) => .catch((err) =>
console.error( console.error(
`settings modal for device ${this.props.id} deletion error`, `settings modal for device ${this.props.id} deletion error`,

View file

@ -153,7 +153,8 @@ class Thermostats extends Component {
<div style={targetTemperature}> <div style={targetTemperature}>
<Icon name="thermometer half" />{" "} <Icon name="thermometer half" />{" "}
{this.props.device.measuredTemperature} ºC <br /> {this.props.device.measuredTemperature} ºC <br />
<Icon name="target" /> {this.state.targetTemperature.toFixed(1)} ºC <Icon name="target" />{" "}
{this.props.device.targetTemperature.toFixed(1)} ºC
</div> </div>
{this.props.tab === "Devices" ? ( {this.props.tab === "Devices" ? (
<Slider <Slider