refactor(Web): update type casting and remove unused imports

This commit is contained in:
ShiYu
2025-05-31 23:07:12 +08:00
parent 44d2616fd4
commit 6433781f07
3 changed files with 5 additions and 6 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ const BackgroundTasks: React.FC = () => {
// 设置轮询
if (pollingActive) {
const interval = setInterval(fetchTasks, 3000);
setPollingIntervalState(interval);
setPollingIntervalState(interval as unknown as number);
}
return () => {
@@ -66,7 +66,7 @@ const BackgroundTasks: React.FC = () => {
} else if (hasActiveTasks && !pollingActive) {
setPollingActive(true);
const interval = setInterval(fetchTasks, 3000);
setPollingIntervalState(interval);
setPollingIntervalState(interval as unknown as number);
}
}, [tasks, pollingActive, pollingInterval, fetchTasks]);