Ne uplne otestovany prepis storu
This commit is contained in:
@@ -1,24 +1,25 @@
|
||||
<script setup>
|
||||
import {onMounted} from "vue";
|
||||
import {fetchPOIList, loading, pointsOfInterest} from "src/composables/objects/poi";
|
||||
import {useAppStore} from "stores/App";
|
||||
import POIList from "components/poi/POIList.vue";
|
||||
import FAB from "components/FAB.vue";
|
||||
import BasicListSkeleton from "components/basicSkeletons/BasicListSkeleton.vue";
|
||||
import {flights} from "src/composables/objects/flight";
|
||||
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
||||
import {usePointsOfInterestStore} from "stores/PointsOfInterest";
|
||||
import {storeToRefs} from "pinia";
|
||||
|
||||
onMounted(() => {
|
||||
fetchPOIList();
|
||||
usePointsOfInterestStore().fetch();
|
||||
useAppStore().setPageTitle("Zajímavá místa");
|
||||
});
|
||||
|
||||
useAppStore().setPageTitle("Zajímavá místa")
|
||||
const {isQueryRunning, pointsOfInterest} = storeToRefs(usePointsOfInterestStore());
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicListSkeleton :items-count-min="5" :items-count-max="10" v-if="loading"/>
|
||||
<BasicListSkeleton :items="10" v-if="isQueryRunning"/>
|
||||
<BasicInfoBanner
|
||||
v-else-if="!loading && pointsOfInterest.length === 0"
|
||||
v-else-if="!isQueryRunning && pointsOfInterest.length === 0"
|
||||
:route-add="{name: 'addPoi'}"
|
||||
label-add="Přidat"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user