Skip to content

Commit

Permalink
Display viewPoints POIs in outdoor site detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrucs committed Sep 19, 2023
1 parent c3b94f2 commit 06e63ed
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion frontend/src/components/pages/site/OutdoorSiteUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ const OutdoorSiteUIWithoutContext: React.FC<Props> = ({ outdoorSiteUrl, language
iconName: poi.type.label,
}))}
type="POI"
medias={{
viewPoints: {
data: outdoorSiteContent.pois.flatMap(
({ viewPoints }) => viewPoints,
),
handleViewPointClick,
},
}}
/>
</section>
);
Expand Down Expand Up @@ -593,7 +601,12 @@ const OutdoorSiteUIWithoutContext: React.FC<Props> = ({ outdoorSiteUrl, language
}))}
infrastructure={outdoorSiteContent.infrastructure}
hideMap={hideMobileMap}
viewPoints={outdoorSiteContent.viewPoints}
viewPoints={[
...outdoorSiteContent.viewPoints,
...outdoorSiteContent.pois
.flatMap(({ viewPoints }) => viewPoints)
.filter(Boolean),
]}
displayMap={displayMobileMap}
setMapId={setMapId}
/>
Expand Down

0 comments on commit 06e63ed

Please sign in to comment.