Linien Daten aktualisieren
This commit is contained in:
@@ -103,7 +103,15 @@ const useLineData = (webserviceGisLinesStatusUrl, setLineStatusData) => {
|
||||
}
|
||||
};
|
||||
|
||||
const scheduleNextFetch = () => {
|
||||
if (!isCancelled) {
|
||||
fetchData();
|
||||
setTimeout(scheduleNextFetch, 30000);
|
||||
}
|
||||
};
|
||||
|
||||
fetchData();
|
||||
scheduleNextFetch();
|
||||
|
||||
return () => {
|
||||
isCancelled = true;
|
||||
|
||||
Reference in New Issue
Block a user