From 215652570ceaaf00947af1c574018d5443b3cbed Mon Sep 17 00:00:00 2001 From: rouggy Date: Sun, 19 Jul 2026 01:51:21 +0200 Subject: [PATCH] fix: blank ADIF monitor settings panel (hooks in a called-as-function panel) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PANELS[selected]() invokes each settings panel as a plain function, so a panel must not call hooks. ADIFMonitorPanel uses useState/useEffect/useI18n, which broke the Rules of Hooks and blanked the section. Render it through JSX (() => ) so it mounts as a real component with its own hook context — same pattern as the Flex panel. --- frontend/src/components/SettingsModal.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/SettingsModal.tsx b/frontend/src/components/SettingsModal.tsx index f942a47..e7ecb29 100644 --- a/frontend/src/components/SettingsModal.tsx +++ b/frontend/src/components/SettingsModal.tsx @@ -4511,7 +4511,10 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan 'lists-modes': ModesPanel, cluster: ClusterPanel, udp: UDPIntegrationsPanelWrapper, - adifmon: ADIFMonitorPanel, + // Rendered as a real element (not called as a bare function) so its own hooks + // — useState/useEffect/useI18n — get a proper component context; PANELS[x]() + // is a plain call and hook-holding panels must go through JSX like this. + adifmon: () => , backup: BackupPanel, database: DatabasePanel, uscounties: USCountiesPanel,