useMemo dependencies

This commit is contained in:
Bernt Christian Egeland 2021-08-31 16:40:45 +02:00
parent 091e773ef7
commit d0d9bdd209

View File

@ -31,6 +31,7 @@ export default function CameraImage({ camera, onload, searchParams = '', stretch
const scaledWidth = useMemo(() => Math.ceil(scaledHeight * aspectRatio - scrollBarWidth), [ const scaledWidth = useMemo(() => Math.ceil(scaledHeight * aspectRatio - scrollBarWidth), [
scaledHeight, scaledHeight,
aspectRatio, aspectRatio,
scrollBarWidth,
]); ]);
const img = useMemo(() => new Image(), []); const img = useMemo(() => new Image(), []);