fix: mount RollbackAlert, fix WifiPanel useEffect, remove unused PoolPanel prop
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -170,7 +170,6 @@ export function PoolPanel({ tenantId, deviceId, active }: ConfigPanelProps) {
|
||||
entries={typedEntries}
|
||||
panel={panel}
|
||||
poolUsedBy={poolUsedBy}
|
||||
existingPools={typedEntries.map((e) => e.name).filter(Boolean)}
|
||||
/>
|
||||
|
||||
{/* Change Preview Modal */}
|
||||
@@ -197,13 +196,10 @@ function PoolTable({
|
||||
entries,
|
||||
panel,
|
||||
poolUsedBy,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
existingPools: _existingPools,
|
||||
}: {
|
||||
entries: PoolEntry[]
|
||||
panel: PanelHook
|
||||
poolUsedBy: Record<string, string[]>
|
||||
existingPools: string[]
|
||||
}) {
|
||||
const [dialogOpen, setDialogOpen] = useState(false)
|
||||
const [editing, setEditing] = useState<PoolEntry | null>(null)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* 2. Security Profiles (RouterOS 6 only) -- authentication, passphrases
|
||||
*/
|
||||
|
||||
import { useState, useMemo, useCallback } from 'react'
|
||||
import { useState, useMemo, useCallback, useEffect } from 'react'
|
||||
import {
|
||||
Wifi,
|
||||
Plus,
|
||||
@@ -629,9 +629,7 @@ function WirelessEditDialog({
|
||||
})
|
||||
|
||||
// Reset form when entry changes
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const _entryId = entry?.['.id'] || ''
|
||||
useState(() => {
|
||||
useEffect(() => {
|
||||
if (entry) {
|
||||
setFormData({
|
||||
ssid: entry.ssid || entry['configuration.ssid'] || '',
|
||||
@@ -643,7 +641,7 @@ function WirelessEditDialog({
|
||||
'security.passphrase': entry['security.passphrase'] || '',
|
||||
})
|
||||
}
|
||||
})
|
||||
}, [entry])
|
||||
|
||||
// Use effect-like pattern to reset form on dialog open
|
||||
const handleOpenChange = useCallback((nextOpen: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user