mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Czas przerwy pomiędzy ładowaniami danych z API został zmieniony na losową wartość pomiędzy 25 i 30 sekund
This commit is contained in:
+4
-1
@@ -92,7 +92,10 @@ export const store = createStore<State>({
|
|||||||
|
|
||||||
dispatch(ACTIONS.fetchOnlineData);
|
dispatch(ACTIONS.fetchOnlineData);
|
||||||
|
|
||||||
setInterval(() => dispatch(ACTIONS.fetchOnlineData), 30000);
|
|
||||||
|
const randIntervalTime = Math.floor(Math.random() * 5000) + 25000;
|
||||||
|
|
||||||
|
setInterval(() => dispatch(ACTIONS.fetchOnlineData), randIntervalTime);
|
||||||
},
|
},
|
||||||
|
|
||||||
async fetchOnlineData({ commit, dispatch }) {
|
async fetchOnlineData({ commit, dispatch }) {
|
||||||
|
|||||||
Reference in New Issue
Block a user