Skip to content

Commit

Permalink
Fix Node.js Timeout type inconsistency in APIWorker
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Aug 28, 2024
1 parent 761eae6 commit a4a8d7c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/src/api/APIWorker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export function APIWorker() {
state => state.beaconMalfunction.vesselBeaconMalfunctionsResumeAndHistory
)

const sideWindowInterval = useRef<NodeJS.Timer>()
const beaconMalfunctionInKanbanInterval = useRef<NodeJS.Timer>()
const vesselBeaconMalfunctionInterval = useRef<NodeJS.Timer>()
const sideWindowInterval = useRef<number>()
const beaconMalfunctionInKanbanInterval = useRef<number>()
const vesselBeaconMalfunctionInterval = useRef<number>()
const [updateVesselSidebarTab, setUpdateVesselSidebarTab] = useState(false)

useEffect(() => {
Expand Down Expand Up @@ -86,7 +86,7 @@ export function APIWorker() {
dispatch(getOperationalAlerts())
dispatch(getAllCurrentReportings())
dispatch(getSilencedAlerts())
}, THIRTY_SECONDS)
}, THIRTY_SECONDS) as any
}

return () => {
Expand All @@ -102,7 +102,7 @@ export function APIWorker() {

beaconMalfunctionInKanbanInterval.current = setInterval(() => {
dispatch(openBeaconMalfunctionInKanban(openedBeaconMalfunctionInKanban.beaconMalfunction.id))
}, THIRTY_SECONDS)
}, THIRTY_SECONDS) as any
}

return () => {
Expand All @@ -118,7 +118,7 @@ export function APIWorker() {

vesselBeaconMalfunctionInterval.current = setInterval(() => {
dispatch(getVesselBeaconMalfunctions(false))
}, THIRTY_SECONDS)
}, THIRTY_SECONDS) as any
}

return () => {
Expand Down

0 comments on commit a4a8d7c

Please sign in to comment.