code quality improvements and improved file error handling

This commit is contained in:
2025-09-17 11:39:26 +01:00
parent b98e3ed85d
commit 0b7ab3b0de
20 changed files with 226 additions and 144 deletions

View File

@@ -16,13 +16,15 @@ const SightingOverview = () => {
setOverlayMode((m) => ((m + 1) % 3) as 0 | 1 | 2);
}, []);
const { side, mostRecent } = useSightingFeedContext();
const { side, mostRecent, isError, isLoading } = useSightingFeedContext();
useOverviewOverlay(mostRecent, overlayMode, imgRef, canvasRef);
const { sync } = useHiDPICanvas(imgRef, canvasRef);
// if (noSighting || isPending) return <p>loading</p>;
if (isLoading) return <p>Loading</p>;
if (isError) return <p>An error occurred, Cannot display footage</p>;
return (
<div className="flex flex-col">