Fix compilation errors and resolve ESLint warnings across multiple components

This commit is contained in:
ajaysi
2026-03-03 08:57:36 +05:30
parent cb6a3a8042
commit 2e04b8e27b
54 changed files with 1170 additions and 930 deletions

View File

@@ -60,7 +60,7 @@ export function usePolling<T = any>(
const attemptsRef = useRef(0);
const currentTaskIdRef = useRef<string | null>(null);
const stopPolling = useCallback(() => {
/* const stopPolling = useCallback(() => {
// Only log and clear if actually polling (not just cleanup on unmount when idle)
const wasPolling = intervalRef.current !== null || isPolling;
@@ -81,7 +81,17 @@ export function usePolling<T = any>(
}
}
// Silently handle cleanup when not polling (common on unmount/re-render)
}, [isPolling]);
}, [isPolling]); */
const stopPolling = useCallback(() => {
if (intervalRef.current) {
clearInterval(intervalRef.current);
intervalRef.current = null;
}
setIsPolling(false);
attemptsRef.current = 0;
currentTaskIdRef.current = null;
}, []);
const startPolling = useCallback((taskId: string) => {
if (isPolling) {