code quality improvements and improved file error handling
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user