Refactor build workflow by removing unnecessary dependency installation step and add new SaT configuration file with scene and source definitions
Some checks failed
Lint and Build / build (pull_request) Failing after 2m57s

This commit is contained in:
Decobus 2025-07-20 13:18:12 -04:00
parent 3c58ccc5af
commit 450b6d6044
4 changed files with 1010 additions and 19 deletions

View file

@ -173,23 +173,25 @@ export function useSmartPolling(
}, [callback]);
React.useEffect(() => {
// Clear any existing interval before setting up a new one
if (intervalRef.current) {
clearInterval(intervalRef.current);
intervalRef.current = null;
}
if (isVisible) {
// Start polling when visible
callbackRef.current();
intervalRef.current = setInterval(() => {
callbackRef.current();
}, interval);
} else {
// Stop polling when not visible
if (intervalRef.current) {
clearInterval(intervalRef.current);
}
}
return () => {
if (intervalRef.current) {
clearInterval(intervalRef.current);
intervalRef.current = null;
}
};
}, [interval, isVisible, dependencies]);
}, [interval, isVisible, ...dependencies]);
}