From 5c8c81f97b95434dbe6b94676ae58edcf02a648e Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Fri, 11 Jul 2025 12:04:52 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(frontend)=20fix=20infinite=20loadi?= =?UTF-8?q?ng=20for=20unauthenticated=20users=20on=20downloads?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorganize exception handling in recording download screen to prevent unauthenticated users from getting stuck in loading state. Caught by production users - my bad; --- .../features/recording/routes/RecordingDownload.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/features/recording/routes/RecordingDownload.tsx b/src/frontend/src/features/recording/routes/RecordingDownload.tsx index a1644193..cb4f885a 100644 --- a/src/frontend/src/features/recording/routes/RecordingDownload.tsx +++ b/src/frontend/src/features/recording/routes/RecordingDownload.tsx @@ -27,11 +27,11 @@ export const RecordingDownload = () => { enabled: !!recordingId, }) - if (isLoading || !data || isAuthLoading) { + if (isLoggedIn === undefined || isAuthLoading) { return } - if (!isLoggedIn) { + if (isLoggedIn === false && !isAuthLoading) { return ( { ) } - if (isError) { + if (isLoading) { + return + } + + if (isError || !data) { return }