refactor how values are rendered to screen and to json. added space before suffix

This commit is contained in:
proddy
2020-10-07 19:16:21 +02:00
parent 442349fa33
commit f6da8d7406
9 changed files with 345 additions and 297 deletions

View File

@@ -165,7 +165,7 @@ class EMSESPDevicesForm extends Component<EMSESPDevicesFormProps, EMSESPDevicesF
{sensorData.id}
</TableCell>
<TableCell align="right">
{sensorData.temp.toFixed(1)}&deg;C
{sensorData.temp.toFixed(1)}&nbsp;&deg;C
</TableCell>
</TableRow>
))}
@@ -284,12 +284,12 @@ class EMSESPDevicesForm extends Component<EMSESPDevicesFormProps, EMSESPDevicesF
</TableHead>
<TableBody>
{deviceData.deviceData.map(deviceData => (
<TableRow key={deviceData.name}>
<TableRow key={deviceData.n}>
<TableCell component="th" scope="row">
{deviceData.name}
{deviceData.n}
</TableCell>
<TableCell align="right">
{deviceData.value}
{deviceData.v}
</TableCell>
</TableRow>
))}