mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 04:32:42 +00:00
`useChartOverlayPrefs` keyed under `["dashboard-layout"]` while the dashboard page, Settings → Dashboard, every other surface that calls the same `/api/dashboard/widgets` endpoint, and `queryKeys` itself all use `["user", "dashboardWidgets"]`. Two cache slots for one endpoint — `/api/dashboard/widgets` fired twice on dashboard mount and the overlay-prefs cache never warmed from the primary fetch. Switch the hook to `queryKeys.dashboardWidgets()` so both readers share the same slot, eliminating the duplicate request and closing a stale-data corner case where one slot updated and the other didn't.