Fix linter and fix lint issues (#10141)

This commit is contained in:
Nicolas Mowen
2024-02-28 15:23:56 -07:00
committed by GitHub
parent b6ef1e4330
commit 3bf2a496e1
63 changed files with 527 additions and 418 deletions

View File

@@ -3,7 +3,7 @@ import CameraImage from "./CameraImage";
type AutoUpdatingCameraImageProps = {
camera: string;
searchParams?: {};
searchParams?: URLSearchParams;
showFps?: boolean;
className?: string;
reloadInterval?: number;
@@ -13,7 +13,7 @@ const MIN_LOAD_TIMEOUT_MS = 200;
export default function AutoUpdatingCameraImage({
camera,
searchParams = "",
searchParams = undefined,
showFps = true,
className,
reloadInterval = MIN_LOAD_TIMEOUT_MS,
@@ -35,6 +35,8 @@ export default function AutoUpdatingCameraImage({
setTimeoutId(undefined);
}
};
// we know that these deps are correct
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [reloadInterval]);
const handleLoad = useCallback(() => {
@@ -53,9 +55,11 @@ export default function AutoUpdatingCameraImage({
() => {
setKey(Date.now());
},
loadTime > reloadInterval ? 1 : reloadInterval
)
loadTime > reloadInterval ? 1 : reloadInterval,
),
);
// we know that these deps are correct
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [key, setFps]);
return (