From e68384abcfc264335651bb0ad292ac8c39f90bb9 Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 2 Jan 2025 15:46:42 -0600 Subject: [PATCH] Use connectionStatus enum properly, further improve mobile scaling for screen-sm basis --- frontend/src/components/useSocket.ts | 2 +- frontend/src/pages/index.astro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/useSocket.ts b/frontend/src/components/useSocket.ts index 4efd27a..abbf6e4 100644 --- a/frontend/src/components/useSocket.ts +++ b/frontend/src/components/useSocket.ts @@ -61,7 +61,7 @@ function useSocket({ notify }: UseSocketProps): UseSocketResult { }[readyState] as Status; useEffect(() => { - if (readyState === WebSocket.CLOSED || readyState === WebSocket.CLOSING) { + if (connectionStatus === "closing" || connectionStatus === "closed") { setId(null); setDownloads(null); setExecutables(null); diff --git a/frontend/src/pages/index.astro b/frontend/src/pages/index.astro index 46adf00..156bd32 100644 --- a/frontend/src/pages/index.astro +++ b/frontend/src/pages/index.astro @@ -6,7 +6,7 @@ import Demo from "@/components/Demo";