Prace s mapou, refresh tokenu (tak nejak), uprava vypisu POI, pridani breadcrumbs

This commit is contained in:
Michal Kváček
2023-07-29 23:26:51 +02:00
parent 864db6c6a2
commit 09d2f25523
42 changed files with 597 additions and 241 deletions
+6 -3
View File
@@ -6,8 +6,11 @@ export const loading = ref(true);
export const poi = ref(null);
export const fetchPoi = (poiId) => {
loading.value = true;
usePointsOfInterestStore().fetchDetail(poiId)
.then(data => poi.value = data)
return usePointsOfInterestStore().fetchDetail(poiId)
.then(data => {
poi.value = data;
return data;
})
.finally(() => loading.value = false);
};
@@ -15,5 +18,5 @@ export const fetchPoi = (poiId) => {
export const pointsOfInterest = storeToRefs(usePointsOfInterestStore()).items;
export const fetchPOIList = () => {
loading.value = true;
usePointsOfInterestStore().fetch().finally(() => loading.value = false);
return usePointsOfInterestStore().fetch().finally(() => loading.value = false);
}