diff --git a/src/pages/DevicePage/DeviceCommands.js b/src/pages/DevicePage/DeviceCommands.js index 7ab924a..121ed61 100644 --- a/src/pages/DevicePage/DeviceCommands.js +++ b/src/pages/DevicePage/DeviceCommands.js @@ -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) diff --git a/src/pages/DevicePage/WifiChannelTable.js b/src/pages/DevicePage/WifiChannelTable.js index da55cbb..8b5e14a 100644 --- a/src/pages/DevicePage/WifiChannelTable.js +++ b/src/pages/DevicePage/WifiChannelTable.js @@ -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}) => ( { channels.map((channel, index) => { - if(index % 2 === 0) return ; + if(index % 2 === 0) return ; return <> }) } @@ -18,7 +19,7 @@ const WifiChannelTable = ({channels}) => ( { channels.map((channel, index) => { - if(index % 2 === 1) return ; + if(index % 2 === 1) return ; return <> }) }