fix: scan no longer triggers before user confirms in ScanConfigModal

This commit is contained in:
Pouzor
2026-04-05 14:35:10 +02:00
parent 07da498d18
commit 4d8bb246f1
5 changed files with 19 additions and 32 deletions
+2 -9
View File
@@ -53,15 +53,8 @@ export function Sidebar({ onAddNode, onAddGroupRect, onScan, onSave, onNodeAppro
const onlineCount = networkNodes.filter((n) => n.data.status === 'online').length
const offlineCount = networkNodes.filter((n) => n.data.status === 'offline').length
const handleScan = useCallback(async () => {
try {
await scanApi.trigger()
toast.success('Network scan started — check Scan History for results')
setActiveView('history')
onScan()
} catch {
toast.error('Failed to trigger scan')
}
const handleScan = useCallback(() => {
onScan()
}, [onScan])
return (