Refactor: Add missing countdownTimerRef cleanup and top-level mounted guards

This commit is contained in:
2026-05-31 21:46:03 +02:00
parent 030709748e
commit 0c0e78af41
3 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -246,7 +246,9 @@ export default function CameraScreen({
startCountdown();
return () => {};
return () => {
if (countdownTimerRef.current) clearTimeout(countdownTimerRef.current);
};
}, [countdownDuration, isIdle, pictureSize, isUsbConnected]);
const startCountdown = () => {