From 17758fd20fa582765532a151fcf0e8b8389a162f Mon Sep 17 00:00:00 2001 From: Lopez <272230284+LopezDev7@users.noreply.github.com> Date: Mon, 10 Aug 2026 15:50:49 -0500 Subject: [PATCH] Reload the server list when the connection comes back --- src/App.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 3c0f7368..a3b6b6fe 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -200,6 +200,16 @@ const App = memo(() => { }; }, [windowResizeListener, initializeApp]); + useEffect(() => { + // Refetch the server list once we get a connection back + const handleOnline = () => { + fetchServers(); + }; + + window.addEventListener("online", handleOnline); + return () => window.removeEventListener("online", handleOnline); + }, []); + const handleLoadingEnd = useCallback(async () => { const endTimer = PerformanceMonitor.time("loading-end"); setLoading(false);