mirror of
				https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
				synced 2025-10-31 18:27:45 +00:00 
			
		
		
		
	[WIFI-12364] Deferred scripts command history fix
Signed-off-by: Charles <charles.bourque96@gmail.com>
This commit is contained in:
		| @@ -28,7 +28,7 @@ import { Modal } from 'components/Modals/Modal'; | |||||||
| import WifiScanResultDisplay from 'components/Modals/WifiScanModal/ResultDisplay'; | import WifiScanResultDisplay from 'components/Modals/WifiScanModal/ResultDisplay'; | ||||||
| import { compactDate } from 'helpers/dateFormatting'; | import { compactDate } from 'helpers/dateFormatting'; | ||||||
| import { uppercaseFirstLetter } from 'helpers/stringHelper'; | import { uppercaseFirstLetter } from 'helpers/stringHelper'; | ||||||
| import { DeviceCommandHistory } from 'hooks/Network/Commands'; | import { DeviceCommandHistory, useGetSingleCommandHistory } from 'hooks/Network/Commands'; | ||||||
| import { WifiScanResult } from 'models/Device'; | import { WifiScanResult } from 'models/Device'; | ||||||
|  |  | ||||||
| type Props = { | type Props = { | ||||||
| @@ -39,9 +39,13 @@ type Props = { | |||||||
|   command?: DeviceCommandHistory; |   command?: DeviceCommandHistory; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| const CommandResultModal = ({ modalProps, command }: Props) => { | const CommandResultModal = ({ modalProps, command: initialCommandInfo }: Props) => { | ||||||
|   const { t } = useTranslation(); |   const { t } = useTranslation(); | ||||||
|   const { colorMode } = useColorMode(); |   const { colorMode } = useColorMode(); | ||||||
|  |   const { data: command } = useGetSingleCommandHistory({ | ||||||
|  |     commandId: initialCommandInfo?.UUID ?? '', | ||||||
|  |     serialNumber: initialCommandInfo?.serialNumber ?? '', | ||||||
|  |   }); | ||||||
|  |  | ||||||
|   if (!command) return null; |   if (!command) return null; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Charles
					Charles