From 9f856b4d02169258a2365a7780ff7728d87e5b69 Mon Sep 17 00:00:00 2001 From: Gauvain <68083474+Gauvino@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:22:24 +0200 Subject: [PATCH] fix: apply coderabbit suggestion Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- app/(auth)/player/direct-player.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/(auth)/player/direct-player.tsx b/app/(auth)/player/direct-player.tsx index 0c30e4e0..f8835305 100644 --- a/app/(auth)/player/direct-player.tsx +++ b/app/(auth)/player/direct-player.tsx @@ -498,7 +498,18 @@ export default function page() { return () => setIsMounted(false); }, []); + // Show error UI first, before checking loading/missing‐data + if (itemStatus.isError || streamStatus.isError) { + return ( + + {t("player.error")} + + ); + } + + // Then show loader while either side is still fetching or data isn’t present if (itemStatus.isLoading || streamStatus.isLoading || !item || !stream) { + // …loader UI… return (