Refactor: Add missing countdownTimerRef cleanup and top-level mounted guards
This commit is contained in:
@@ -246,7 +246,9 @@ export default function CameraScreen({
|
||||
|
||||
startCountdown();
|
||||
|
||||
return () => {};
|
||||
return () => {
|
||||
if (countdownTimerRef.current) clearTimeout(countdownTimerRef.current);
|
||||
};
|
||||
}, [countdownDuration, isIdle, pictureSize, isUsbConnected]);
|
||||
|
||||
const startCountdown = () => {
|
||||
|
||||
Reference in New Issue
Block a user