From 357de451720946f3c42b0a250880b111a27bc022 Mon Sep 17 00:00:00 2001 From: ceotjoe Date: Tue, 12 May 2026 08:50:18 +0200 Subject: [PATCH] fix(grid-display): pass location object to latLonToMaidenhead, not bare lat/lon d1ab3d5 replaced calculateGridSquare(lat, lon) with latLonToMaidenhead but kept the two-positional-arg call style. latLonToMaidenhead expects ({lat, lon}) as its first argument; passing a bare number caused lat/lon to destructure as undefined, producing NaN and invisible characters in both DE and DX grid squares. Co-Authored-By: Claude Sonnet 4.6 --- src/hooks/app/useTimeState.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/app/useTimeState.js b/src/hooks/app/useTimeState.js index 1f07451a..de40136d 100644 --- a/src/hooks/app/useTimeState.js +++ b/src/hooks/app/useTimeState.js @@ -98,8 +98,8 @@ export default function useTimeState(configLocation, dxLocation, timezone) { return () => clearTimeout(timeout); }, [startTime]); - const deGrid = useMemo(() => latLonToMaidenhead(configLocation.lat, configLocation.lon), [configLocation]); - const dxGrid = useMemo(() => latLonToMaidenhead(dxLocation.lat, dxLocation.lon), [dxLocation]); + const deGrid = useMemo(() => latLonToMaidenhead(configLocation), [configLocation]); + const dxGrid = useMemo(() => latLonToMaidenhead(dxLocation), [dxLocation]); // Validate the timezone once per changed value, not on every render. // new Intl.DateTimeFormat throws a RangeError for invalid values such as