refactor(web): async routing

This commit is contained in:
Paul Armstrong
2021-02-20 08:20:17 -06:00
committed by Blake Blackshear
parent 24ec13e36d
commit 7aee28d080
14 changed files with 95 additions and 93 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ export default function CameraImage({ camera, onload, searchParams = '' }) {
);
useEffect(() => {
if (!scaledHeight) {
if (!scaledHeight || !canvasRef.current) {
return;
}
img.src = `${apiHost}/api/${name}/latest.jpg?h=${scaledHeight}${searchParams ? `&${searchParams}` : ''}`;