fix(EasySetup): scroll to top when navigating between steps

Adds a useEffect that smoothly scrolls the window to the top whenever
the wizard step changes. This ensures users always see the beginning
of each step content rather than remaining scrolled down from the
previous step.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Chris Sherwood 2026-02-02 16:32:41 -08:00 committed by Jake Turner
parent 2c4fc59428
commit 738b57e854

View File

@ -453,6 +453,11 @@ export default function EasySetupWizard(props: { system: { services: ServiceSlim
},
})
// Scroll to top when step changes
useEffect(() => {
window.scrollTo({ top: 0, behavior: 'smooth' })
}, [currentStep])
// Auto-fetch latest collections if the list is empty
useEffect(() => {
if (mapCollections && mapCollections.length === 0 && !fetchLatestMapCollections.isPending) {