mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-10-30 01:42:19 +00:00
Small fixes for other errors
This commit is contained in:
@@ -67,7 +67,7 @@ const DeviceCommands = ({selectedDeviceId}) => {
|
||||
};
|
||||
|
||||
const toggleDetails = (item, index) => {
|
||||
if(item.command !== 'wifiscan'){
|
||||
if(item.command !== 'wifiscan' || !item.results.status){
|
||||
const position = details.indexOf(index);
|
||||
let newDetails = details.slice();
|
||||
|
||||
@@ -91,10 +91,6 @@ const DeviceCommands = ({selectedDeviceId}) => {
|
||||
}
|
||||
|
||||
const getDetails = (command, commandDetails) => {
|
||||
if (command === 'wifiscan') {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (command === 'reboot' || command === 'leds'){
|
||||
const result = commandDetails.results;
|
||||
if(result)
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
CRow
|
||||
} from '@coreui/react';
|
||||
import React from 'react';
|
||||
import { v4 as createUuid } from 'uuid';
|
||||
import WifiChannelCard from './WifiChannelCard';
|
||||
|
||||
const WifiChannelTable = ({channels}) => (
|
||||
@@ -10,7 +11,7 @@ const WifiChannelTable = ({channels}) => (
|
||||
<CCol>
|
||||
{
|
||||
channels.map((channel, index) => {
|
||||
if(index % 2 === 0) return <WifiChannelCard channel={channel}/>;
|
||||
if(index % 2 === 0) return <WifiChannelCard key={createUuid()} channel={channel}/>;
|
||||
return <></>
|
||||
})
|
||||
}
|
||||
@@ -18,7 +19,7 @@ const WifiChannelTable = ({channels}) => (
|
||||
<CCol>
|
||||
{
|
||||
channels.map((channel, index) => {
|
||||
if(index % 2 === 1) return <WifiChannelCard channel={channel}/>;
|
||||
if(index % 2 === 1) return <WifiChannelCard key={createUuid()} channel={channel}/>;
|
||||
return <></>
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user