Prace s mapou, refresh tokenu (tak nejak), uprava vypisu POI, pridani breadcrumbs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user