diff --git a/src/components/grw-map/grw-map.tsx b/src/components/grw-map/grw-map.tsx
index e04cb920..872e359b 100644
--- a/src/components/grw-map/grw-map.tsx
+++ b/src/components/grw-map/grw-map.tsx
@@ -491,7 +491,12 @@ export class GrwMap {
id: trek.id,
name: trek.name,
practice: state.practices.find(practice => practice.id === trek.practice)?.pictogram,
- imgSrc: trek.attachments && trek.attachments.length > 0 && trek.attachments[0].thumbnail,
+ imgSrc:
+ trek.attachments && trek.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? trek.attachments[0].thumbnail !== ''
+ ? trek.attachments[0].thumbnail
+ : trek.attachments[0].url
+ : null,
},
});
}
@@ -792,7 +797,12 @@ export class GrwMap {
id: trek.id,
name: trek.name,
practice: state.practices.find(practice => practice.id === trek.practice)?.pictogram,
- imgSrc: trek.attachments && trek.attachments.length > 0 && trek.attachments[0].thumbnail,
+ imgSrc:
+ trek.attachments && trek.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? trek.attachments[0].thumbnail !== ''
+ ? trek.attachments[0].thumbnail
+ : trek.attachments[0].url
+ : null,
},
});
}
@@ -994,7 +1004,12 @@ export class GrwMap {
id: trek.id,
name: trek.name,
practice: state.practices.find(practice => practice.id === trek.practice)?.pictogram,
- imgSrc: trek.attachments && trek.attachments.length > 0 && trek.attachments[0].thumbnail,
+ imgSrc:
+ trek.attachments && trek.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? trek.attachments[0].thumbnail !== ''
+ ? trek.attachments[0].thumbnail
+ : trek.attachments[0].url
+ : null,
},
});
}
@@ -1095,7 +1110,11 @@ export class GrwMap {
name: state.currentTrekSteps[stepIndex].name,
practice: state.practices.find(practice => practice.id === state.currentTrekSteps[stepIndex].practice)?.pictogram,
imgSrc:
- state.currentTrekSteps[stepIndex].attachments && state.currentTrekSteps[stepIndex].attachments.length > 0 && state.currentTrekSteps[stepIndex].attachments[0].thumbnail,
+ state.currentTrekSteps[stepIndex].attachments && state.currentTrekSteps[stepIndex].attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? state.currentTrekSteps[stepIndex].attachments[0].thumbnail !== ''
+ ? state.currentTrekSteps[stepIndex].attachments[0].thumbnail
+ : state.currentTrekSteps[stepIndex].attachments[0].url
+ : null,
index: stepIndex + 1,
},
});
@@ -1291,7 +1310,12 @@ export class GrwMap {
id: currentTouristicContent.id,
name: currentTouristicContent.name,
practice: state.touristicContentCategories.find(touristicContentCategory => touristicContentCategory.id === currentTouristicContent.category).pictogram,
- imgSrc: currentTouristicContent.attachments && currentTouristicContent.attachments.length > 0 && currentTouristicContent.attachments[0].thumbnail,
+ imgSrc:
+ currentTouristicContent.attachments && currentTouristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? currentTouristicContent.attachments[0].thumbnail !== ''
+ ? currentTouristicContent.attachments[0].thumbnail
+ : currentTouristicContent.attachments[0].url
+ : null,
},
});
}
@@ -1465,7 +1489,12 @@ export class GrwMap {
id: touristicContent.id,
name: touristicContent.name,
category: state.touristicContentCategories.find(practice => practice.id === touristicContent.category)?.pictogram,
- imgSrc: touristicContent.attachments && touristicContent.attachments.length > 0 && touristicContent.attachments[0].thumbnail,
+ imgSrc:
+ touristicContent.attachments && touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? touristicContent.attachments[0].thumbnail !== ''
+ ? touristicContent.attachments[0].thumbnail
+ : touristicContent.attachments[0].url
+ : null,
},
});
}
@@ -1568,7 +1597,12 @@ export class GrwMap {
id: currentTouristicEvent.id,
name: currentTouristicEvent.name,
type: state.touristicEventTypes.find(touristicEventType => touristicEventType.id === currentTouristicEvent.type)?.pictogram,
- imgSrc: currentTouristicEvent.attachments && currentTouristicEvent.attachments.length > 0 && currentTouristicEvent.attachments[0].thumbnail,
+ imgSrc:
+ currentTouristicEvent.attachments && currentTouristicEvent.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? currentTouristicEvent.attachments[0].thumbnail !== ''
+ ? currentTouristicEvent.attachments[0].thumbnail
+ : currentTouristicEvent.attachments[0].url
+ : null,
},
});
}
@@ -1696,7 +1730,12 @@ export class GrwMap {
id: currentOutdoorSite.id,
name: currentOutdoorSite.name,
practice: state.outdoorPractices.find(practice => practice.id === currentOutdoorSite.practice)?.pictogram,
- imgSrc: currentOutdoorSite.attachments && currentOutdoorSite.attachments.length > 0 && currentOutdoorSite.attachments[0].thumbnail,
+ imgSrc:
+ currentOutdoorSite.attachments && currentOutdoorSite.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? currentOutdoorSite.attachments[0].thumbnail !== ''
+ ? currentOutdoorSite.attachments[0].thumbnail
+ : currentOutdoorSite.attachments[0].url
+ : null,
},
});
}
@@ -1881,7 +1920,12 @@ export class GrwMap {
id: currentRelatedOutdoorSite.id,
name: currentRelatedOutdoorSite.name,
practice: state.outdoorPractices.find(practice => practice.id === currentRelatedOutdoorSite.practice)?.pictogram,
- imgSrc: currentRelatedOutdoorSite.attachments && currentRelatedOutdoorSite.attachments.length > 0 && currentRelatedOutdoorSite.attachments[0].thumbnail,
+ imgSrc:
+ currentRelatedOutdoorSite.attachments && currentRelatedOutdoorSite.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? currentRelatedOutdoorSite.attachments[0].thumbnail !== ''
+ ? currentRelatedOutdoorSite.attachments[0].thumbnail
+ : currentRelatedOutdoorSite.attachments[0].url
+ : null,
},
});
}
@@ -1924,7 +1968,12 @@ export class GrwMap {
id: currentRelatedOutdoorCourse.id,
name: currentRelatedOutdoorCourse.name,
type: state.outdoorCourseTypes.find(type => type.id === currentRelatedOutdoorCourse.type)?.pictogram,
- imgSrc: currentRelatedOutdoorCourse.attachments && currentRelatedOutdoorCourse.attachments.length > 0 && currentRelatedOutdoorCourse.attachments[0].thumbnail,
+ imgSrc:
+ currentRelatedOutdoorCourse.attachments && currentRelatedOutdoorCourse.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? currentRelatedOutdoorCourse.attachments[0].thumbnail !== ''
+ ? currentRelatedOutdoorCourse.attachments[0].thumbnail
+ : currentRelatedOutdoorCourse.attachments[0].url
+ : null,
},
});
}
@@ -1972,7 +2021,12 @@ export class GrwMap {
id: touristicEvent.id,
name: touristicEvent.name,
category: state.touristicEventTypes.find(type => type.id === touristicEvent.type)?.pictogram,
- imgSrc: touristicEvent.attachments && touristicEvent.attachments.length > 0 && touristicEvent.attachments[0].thumbnail,
+ imgSrc:
+ touristicEvent.attachments && touristicEvent.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? touristicEvent.attachments[0].thumbnail !== ''
+ ? touristicEvent.attachments[0].thumbnail
+ : touristicEvent.attachments[0].url
+ : null,
},
});
}
@@ -2127,7 +2181,12 @@ export class GrwMap {
id: outdoorSite.id,
name: outdoorSite.name,
practice: state.outdoorPractices.find(practice => practice.id === outdoorSite.practice)?.pictogram,
- imgSrc: outdoorSite.attachments && outdoorSite.attachments.length > 0 && outdoorSite.attachments[0].thumbnail,
+ imgSrc:
+ outdoorSite.attachments && outdoorSite.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? outdoorSite.attachments[0].thumbnail !== ''
+ ? outdoorSite.attachments[0].thumbnail
+ : outdoorSite.attachments[0].url
+ : null,
},
});
}
@@ -2226,7 +2285,12 @@ export class GrwMap {
id: outdoorCourse.id,
name: outdoorCourse.name,
type: state.outdoorCourseTypes.find(type => type.id === outdoorCourse.type)?.pictogram,
- imgSrc: outdoorCourse.attachments && outdoorCourse.attachments.length > 0 && outdoorCourse.attachments[0].thumbnail,
+ imgSrc:
+ outdoorCourse.attachments && outdoorCourse.attachments.filter(attachment => attachment.type === 'image').length > 0
+ ? outdoorCourse.attachments[0].thumbnail !== ''
+ ? outdoorCourse.attachments[0].thumbnail
+ : outdoorCourse.attachments[0].url
+ : null,
},
});
}
diff --git a/src/components/grw-outdoor-course-card/grw-outdoor-course-card.tsx b/src/components/grw-outdoor-course-card/grw-outdoor-course-card.tsx
index 76f728ae..674696a7 100644
--- a/src/components/grw-outdoor-course-card/grw-outdoor-course-card.tsx
+++ b/src/components/grw-outdoor-course-card/grw-outdoor-course-card.tsx
@@ -79,7 +79,11 @@ export class GrwOutdoorCourseCard {
attachment.type === 'image')[0].thumbnail}`}
+ src={`${
+ this.outdoorCourse.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail !== ''
+ ? this.outdoorCourse.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail
+ : this.outdoorCourse.attachments.filter(attachment => attachment.type === 'image')[0].url
+ }`}
alt={`${this.outdoorCourse.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}
loading="lazy"
/>
diff --git a/src/components/grw-outdoor-course-detail/grw-outdoor-course-detail.tsx b/src/components/grw-outdoor-course-detail/grw-outdoor-course-detail.tsx
index 4856a24e..b008a728 100644
--- a/src/components/grw-outdoor-course-detail/grw-outdoor-course-detail.tsx
+++ b/src/components/grw-outdoor-course-detail/grw-outdoor-course-detail.tsx
@@ -285,7 +285,7 @@ export class GrwOutdoorCourseDetail {
this.handleFullscreen()}
/* @ts-ignore */
diff --git a/src/components/grw-outdoor-site-card/grw-outdoor-site-card.tsx b/src/components/grw-outdoor-site-card/grw-outdoor-site-card.tsx
index 530db877..13625445 100644
--- a/src/components/grw-outdoor-site-card/grw-outdoor-site-card.tsx
+++ b/src/components/grw-outdoor-site-card/grw-outdoor-site-card.tsx
@@ -76,8 +76,11 @@ export class GrwOutdoorSiteCard {
attachment.type === 'image')[0].thumbnail}`}
+ src={`${
+ this.outdoorSite.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail !== ''
+ ? this.outdoorSite.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail
+ : this.outdoorSite.attachments.filter(attachment => attachment.type === 'image')[0].url
+ }`}
alt={`${this.outdoorSite.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}
loading="lazy"
/>
diff --git a/src/components/grw-outdoor-site-detail/grw-outdoor-site-detail.tsx b/src/components/grw-outdoor-site-detail/grw-outdoor-site-detail.tsx
index 6adcf4e4..c9c6f8db 100644
--- a/src/components/grw-outdoor-site-detail/grw-outdoor-site-detail.tsx
+++ b/src/components/grw-outdoor-site-detail/grw-outdoor-site-detail.tsx
@@ -700,7 +700,7 @@ export class GrwOutdoorSiteDetail {
this.handleFullscreen()}
/* @ts-ignore */
diff --git a/src/components/grw-poi-detail/grw-poi.tsx b/src/components/grw-poi-detail/grw-poi.tsx
index fd919e31..5285beb9 100644
--- a/src/components/grw-poi-detail/grw-poi.tsx
+++ b/src/components/grw-poi-detail/grw-poi.tsx
@@ -114,7 +114,7 @@ export class GrwPoiDetail {
{
@@ -188,7 +188,11 @@ export class GrwTouristicContentCard {
attachment.type === 'image')[0].thumbnail}`}
+ src={`${
+ this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail !== ''
+ ? this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail
+ : this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].url
+ }`}
alt={`${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}
loading="lazy"
/>
diff --git a/src/components/grw-touristic-content-detail/grw-touristic-content-detail.tsx b/src/components/grw-touristic-content-detail/grw-touristic-content-detail.tsx
index 711fc406..1c8f146f 100644
--- a/src/components/grw-touristic-content-detail/grw-touristic-content-detail.tsx
+++ b/src/components/grw-touristic-content-detail/grw-touristic-content-detail.tsx
@@ -124,7 +124,7 @@ export class GrwTouristicContentDetail {
this.handleFullscreen()}
alt={attachment.legend}
diff --git a/src/components/grw-touristic-event-card/grw-touristic-event-card.tsx b/src/components/grw-touristic-event-card/grw-touristic-event-card.tsx
index 4b545380..b814693c 100644
--- a/src/components/grw-touristic-event-card/grw-touristic-event-card.tsx
+++ b/src/components/grw-touristic-event-card/grw-touristic-event-card.tsx
@@ -147,7 +147,7 @@ export class GrwTouristicEvent {
{
@@ -179,7 +179,11 @@ export class GrwTouristicEvent {
attachment.type === 'image')[0].thumbnail}`}
+ src={`${
+ this.touristicEvent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail !== ''
+ ? this.touristicEvent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail
+ : this.touristicEvent.attachments.filter(attachment => attachment.type === 'image')[0].url
+ }`}
alt={`${this.touristicEvent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}
loading="lazy"
/>
diff --git a/src/components/grw-touristic-event-detail/grw-touristic-event-detail.tsx b/src/components/grw-touristic-event-detail/grw-touristic-event-detail.tsx
index 00d301d8..8841fe7f 100644
--- a/src/components/grw-touristic-event-detail/grw-touristic-event-detail.tsx
+++ b/src/components/grw-touristic-event-detail/grw-touristic-event-detail.tsx
@@ -125,7 +125,7 @@ export class GrwTouristicEventDetail {
this.handleFullscreen()}
alt={attachment.legend}
diff --git a/src/components/grw-trek-card/grw-trek-card.tsx b/src/components/grw-trek-card/grw-trek-card.tsx
index d9e1f1a2..4bc72f23 100644
--- a/src/components/grw-trek-card/grw-trek-card.tsx
+++ b/src/components/grw-trek-card/grw-trek-card.tsx
@@ -124,7 +124,11 @@ export class GrwTrekCard {
attachment.type === 'image')[0].thumbnail}`}
+ src={`${
+ this.currentTrek.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail !== ''
+ ? this.currentTrek.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail
+ : this.currentTrek.attachments.filter(attachment => attachment.type === 'image')[0].url
+ }`}
alt={`${this.currentTrek.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}
loading="lazy"
/* @ts-ignore */
diff --git a/src/components/grw-trek-detail/grw-trek-detail.tsx b/src/components/grw-trek-detail/grw-trek-detail.tsx
index 90ee060c..9405000a 100644
--- a/src/components/grw-trek-detail/grw-trek-detail.tsx
+++ b/src/components/grw-trek-detail/grw-trek-detail.tsx
@@ -1079,7 +1079,7 @@ export class GrwTrekDetail {
this.handleFullscreen()}
/* @ts-ignore */