From 048d7249a4221d2a8ac5cf91a0ad98a0d41ee3d3 Mon Sep 17 00:00:00 2001 From: Frank Stellmacher <171614930+Psychotoxical@users.noreply.github.com> Date: Fri, 24 Apr 2026 21:21:42 +0200 Subject: [PATCH] fix(home): refresh Mainstage when active server changes (#291) Adds activeServerId to the Home useEffect dependencies so a server switch triggered while the user is already on the Mainstage refetches albums/artists instead of leaving stale covers (which broke against the new server's cover URLs). Co-authored-by: Claude Opus 4.7 (1M context) --- src/pages/Home.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index e7a4137b..86a72937 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -16,6 +16,7 @@ const HOME_DISCOVER_SLICE = 20; export default function Home() { const homeSections = useHomeStore(s => s.sections); + const activeServerId = useAuthStore(s => s.activeServerId); const musicLibraryFilterVersion = useAuthStore(s => s.musicLibraryFilterVersion); const mixMinRatingFilterEnabled = useAuthStore(s => s.mixMinRatingFilterEnabled); const mixMinRatingAlbum = useAuthStore(s => s.mixMinRatingAlbum); @@ -70,6 +71,7 @@ export default function Home() { })(); return () => { cancelled = true; }; }, [ + activeServerId, musicLibraryFilterVersion, homeSections, mixMinRatingFilterEnabled,