Skip to content

Commit

Permalink
decrease status update time to every second (#442)
Browse files Browse the repository at this point in the history
* reduced time to update location status

* reduced time to update location status to every second
  • Loading branch information
GhostOf0days authored Jan 15, 2024
1 parent 871fd4a commit 144432c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ function App() {
}
return updateExtendedLocationData; // returns itself here
})(), // self-invoking function
10 * 1000, // updates every 10 seconds
1 * 1000, // updates every second
);
return () => clearInterval(intervalId);
}, [locations]);

// Auto-refresh the page when the user goes online after previously being offline
useEffect(() => {
function handleOnline() {
Expand Down

0 comments on commit 144432c

Please sign in to comment.