fix survey auto close

This commit is contained in:
Dhruwang
2025-05-27 09:34:35 +05:30
parent e9c45daf71
commit d8d302dffe

View File

@@ -56,6 +56,11 @@ export function AutoCloseWrapper({
};
useEffect(() => {
if (survey.autoClose) {
// Reset interaction state when auto-close is enabled
setHasInteracted(false);
setCountDownActive(true);
}
startCountdown();
return stopCountdown;
// eslint-disable-next-line react-hooks/exhaustive-deps -- we don't want to run this effect on every render