From 32168be911b7e6e0da037e5c12e07b0d0c1761d5 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sun, 23 Aug 2026 22:35:11 +0100 Subject: [PATCH] Update About Component to Include Connection Status in API Version Fetching - Modified the About component to check for both token and connection status before fetching API and WebSocket server versions, enhancing the reliability of version retrieval. - Updated the dependency array in the useEffect hook to include the connection status, ensuring that version fetching reacts appropriately to connection changes. --- src/components/Dashboard/Management/About.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Dashboard/Management/About.jsx b/src/components/Dashboard/Management/About.jsx index e97fbeb0..a2ca7d53 100644 --- a/src/components/Dashboard/Management/About.jsx +++ b/src/components/Dashboard/Management/About.jsx @@ -29,7 +29,7 @@ const About = () => { updater: true }) const { token } = useContext(AuthContext) - const { fetchApiServerVersion, fetchWsServerVersion } = + const { fetchApiServerVersion, fetchWsServerVersion, connected } = useContext(ApiServerContext) const { isElectron, getAppEngine } = useContext(ElectronContext) const { checkForUpdates } = useContext(AppUpdateContext) @@ -62,7 +62,7 @@ const About = () => { } useEffect(() => { - if (token) { + if (token && connected) { fetchApiServerVersion().then((version) => { setApiServerVersion(version) }) @@ -70,7 +70,7 @@ const About = () => { setWsServerVersion(version) }) } - }, [fetchApiServerVersion, fetchWsServerVersion, token]) + }, [fetchApiServerVersion, fetchWsServerVersion, token, connected]) useEffect(() => { if (!isElectron) return