Cookies v SSR
This commit is contained in:
@@ -1,13 +1,3 @@
|
||||
<script>
|
||||
import {usePointsOfInterestStore} from "stores/PointsOfInterest";
|
||||
|
||||
export default {
|
||||
preFetch({currentRoute, store}) {
|
||||
return usePointsOfInterestStore(store).fetchPublicDetail(currentRoute.params.id);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script setup>
|
||||
import {storeToRefs} from "pinia";
|
||||
import {usePhotosStore} from "stores/Photos";
|
||||
@@ -21,6 +11,15 @@ import {useMeta} from "quasar";
|
||||
import {metaData} from "src/composables/meta";
|
||||
import FlightsListSkeleton from "components/flights/skeletons/FlightsListSkeleton.vue";
|
||||
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
||||
import {usePointsOfInterestStore} from "stores/PointsOfInterest";
|
||||
import {onServerPrefetch} from "vue";
|
||||
import {useRoute} from "vue-router";
|
||||
|
||||
const $route = useRoute();
|
||||
|
||||
onServerPrefetch(() => {
|
||||
return usePointsOfInterestStore().fetchPublicDetail($route.params.id);
|
||||
});
|
||||
|
||||
const {pointOfInterest, isQueryRunning} = storeToRefs(usePointsOfInterestStore());
|
||||
const {photos, isQueryRunning: arePhotosLoading} = storeToRefs(usePhotosStore());
|
||||
|
||||
Reference in New Issue
Block a user