From df273e9b2b28f3bc53966570182ceb14c9f8de63 Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 3 Jan 2022 00:43:48 +0100 Subject: [PATCH] =?UTF-8?q?Poprawka=20w=20=C5=82adowaniu=20rozk=C5=82ad?= =?UTF-8?q?=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SceneryView/SceneryHistory.vue | 4 ++-- src/store/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/SceneryView/SceneryHistory.vue b/src/components/SceneryView/SceneryHistory.vue index d70c593..e82ad74 100644 --- a/src/components/SceneryView/SceneryHistory.vue +++ b/src/components/SceneryView/SceneryHistory.vue @@ -1,6 +1,6 @@ diff --git a/src/store/index.ts b/src/store/index.ts index de82fd7..fde9ec7 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -92,6 +92,7 @@ export const store = createStore({ // Nowy parametr żądania co godzinę const sceneryData: StationJSONData = await (await axios.get(`${URLs.sceneryData}?time=${Math.floor(Date.now() / 1800000)}`)).data; + commit(MUTATIONS.SET_TIMETABLE_DATA_STATUS, DataStatus.Loading); commit(MUTATIONS.SET_SCENERY_DATA, sceneryData); commit(MUTATIONS.SET_SCENERY_DATA_STATUS, DataStatus.Loaded); dispatch(ACTIONS.fetchOnlineData); @@ -180,7 +181,6 @@ export const store = createStore({ }, async fetchTimetableData({ commit }) { - commit(MUTATIONS.SET_TIMETABLE_DATA_STATUS, DataStatus.Loading); const reducedList = this.state.trainList.reduce(async (acc: Promise, train: Train) => { const timetable: TimetableAPIData = await (await axios.get(URLs.getTimetableURL(train.trainNo, this.state.region.id))).data.message;