mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-09-07 00:27:44 +08:00
refactor(Web): update type casting and remove unused imports
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user