From 3d1c66b420e240ed97be149fc8941769bbf3e876 Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 12 Jul 2024 14:50:01 +0200 Subject: [PATCH] fix: cache control --- src/store/apiStore.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/store/apiStore.ts b/src/store/apiStore.ts index bb828dd..4e66840 100644 --- a/src/store/apiStore.ts +++ b/src/store/apiStore.ts @@ -51,6 +51,12 @@ export const useApiStore = defineStore('apiStore', { // Static data this.fetchDonatorsData(); this.fetchStationsGeneralInfo(); + + // Ponowne pobieranie danych po ServiceWorkerze + setTimeout(() => { + this.fetchStationsGeneralInfo(); + }, Math.floor(Math.random() * 500) + 1000); + this.fetchVehiclesInfo(); },