diff --git a/src/components/CollectionLink.vue b/src/components/CollectionLink.vue
new file mode 100644
index 000000000..a7c495c5c
--- /dev/null
+++ b/src/components/CollectionLink.vue
@@ -0,0 +1,45 @@
+
+
+ {{ $tc('stacCollection') }}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Catalog.vue b/src/views/Catalog.vue
index da8dd577a..51ccc0856 100644
--- a/src/views/Catalog.vue
+++ b/src/views/Catalog.vue
@@ -38,6 +38,7 @@
+
@@ -76,6 +77,7 @@ export default {
BTabs,
BTab,
Catalogs,
+ CollectionLink: () => import('../components/CollectionLink.vue'),
DeprecationNotice: () => import('../components/DeprecationNotice.vue'),
Description,
Items,
@@ -126,7 +128,7 @@ export default {
},
computed: {
...mapState(['data', 'url', 'apiItems', 'apiItemsLink', 'apiItemsPagination']),
- ...mapGetters(['additionalLinks', 'catalogs', 'isCollection', 'items', 'hasMoreCollections', 'getApiItemsLoading', 'parentLink', 'rootLink']),
+ ...mapGetters(['additionalLinks', 'catalogs', 'collectionLink', 'isCollection', 'items', 'hasMoreCollections', 'getApiItemsLoading', 'parentLink', 'rootLink']),
hasThumbnails() {
return this.thumbnails.length > 0;
},
diff --git a/src/views/Item.vue b/src/views/Item.vue
index 7314d93b5..484226d1f 100644
--- a/src/views/Item.vue
+++ b/src/views/Item.vue
@@ -27,10 +27,7 @@
-
- {{ $tc('stacCollection') }}
-
-
+
@@ -45,7 +42,6 @@ import Description from '../components/Description.vue';
import ReadMore from "vue-read-more-smooth";
import ShowAssetMixin from '../components/ShowAssetMixin';
import { BTabs, BTab } from 'bootstrap-vue';
-import Utils from '../utils';
import { addSchemaToDocument, createItemSchema } from '../schema-org';
export default {
@@ -55,7 +51,7 @@ export default {
Assets,
BTabs,
BTab,
- Catalog: () => import('../components/Catalog.vue'),
+ CollectionLink: () => import('../components/CollectionLink.vue'),
Description,
DeprecationNotice: () => import('../components/DeprecationNotice.vue'),
Links: () => import('../components/Links.vue'),
@@ -84,10 +80,7 @@ export default {
},
computed: {
...mapState(['data', 'url']),
- ...mapGetters(['additionalLinks', 'collectionLink', 'getStac', 'parentLink']),
- collection() {
- return this.getStac(this.collectionLink);
- }
+ ...mapGetters(['additionalLinks', 'collectionLink', 'parentLink'])
},
watch: {
data: {
@@ -100,14 +93,6 @@ export default {
console.error(error);
}
}
- },
- collectionLink: {
- immediate: true,
- handler(newLink) {
- if (Utils.isObject(newLink)) {
- this.$store.dispatch("load", { url: newLink.href });
- }
- }
}
}
};