Czas przerwy pomiędzy ładowaniami danych z API został zmieniony na losową wartość pomiędzy 25 i 30 sekund

This commit is contained in:
2021-12-05 16:16:35 +01:00
parent 83bdadfe02
commit 79d7cf87a3
+4 -1
View File
@@ -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 }) {