diff --git a/frontend/src/pages/inbounds/InboundFormModal.tsx b/frontend/src/pages/inbounds/InboundFormModal.tsx index 2eaaa852..6c7213ec 100644 --- a/frontend/src/pages/inbounds/InboundFormModal.tsx +++ b/frontend/src/pages/inbounds/InboundFormModal.tsx @@ -60,7 +60,7 @@ import { DBInbound } from '@/models/dbinbound.js'; import FinalMaskForm from '@/components/FinalMaskForm'; import DateTimePicker from '@/components/DateTimePicker'; import JsonEditor from '@/components/JsonEditor'; -import { useNodes, type NodeRecord } from '@/hooks/useNodes'; +import type { NodeRecord } from '@/hooks/useNodes'; import './InboundFormModal.css'; const { TextArea } = Input; @@ -73,6 +73,7 @@ interface InboundFormModalProps { mode: 'add' | 'edit'; dbInbound: any; dbInbounds: any[]; + availableNodes?: NodeRecord[]; } const TRAFFIC_RESETS = ['never', 'hourly', 'daily', 'weekly', 'monthly']; @@ -156,10 +157,10 @@ export default function InboundFormModal({ mode, dbInbound, dbInbounds, + availableNodes, }: InboundFormModalProps) { const { t } = useTranslation(); const [messageApi, messageContextHolder] = message.useMessage(); - const { nodes: availableNodes } = useNodes(); const selectableNodes = useMemo( () => (availableNodes || []).filter((n: NodeRecord) => n.enable), [availableNodes], diff --git a/frontend/src/pages/inbounds/InboundsPage.tsx b/frontend/src/pages/inbounds/InboundsPage.tsx index 98795f91..27323fe4 100644 --- a/frontend/src/pages/inbounds/InboundsPage.tsx +++ b/frontend/src/pages/inbounds/InboundsPage.tsx @@ -524,6 +524,7 @@ export default function InboundsPage() { mode={formMode} dbInbound={formDbInbound} dbInbounds={dbInbounds as any[]} + availableNodes={nodesList} />