mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
refactor device value rendering (to Web, Console or MQTT) to base class #632
This commit is contained in:
@@ -342,13 +342,13 @@ class EMSESPDevicesForm extends Component<
|
||||
<TableHead></TableHead>
|
||||
<TableBody>
|
||||
{deviceData.data.map((item, i) => {
|
||||
if (i % 2) {
|
||||
if (i % 3) {
|
||||
return null;
|
||||
} else {
|
||||
return (
|
||||
<TableRow key={i}>
|
||||
<TableCell component="th" scope="row">{deviceData.data[i]}</TableCell>
|
||||
<TableCell align="right">{deviceData.data[i + 1]}</TableCell>
|
||||
<TableCell component="th" scope="row">{deviceData.data[i+2]}</TableCell>
|
||||
<TableCell align="right">{deviceData.data[i]}{deviceData.data[i + 1]}</TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user