Merged in fix/SW-1819-batching-city-urls (pull request #1477)
fix(SW-1819): Batching fetch for city page urls * fix(SW-1819): Batching fetch for city page urls Approved-by: Fredrik Thorsson Approved-by: Matilda Landström
This commit is contained in:
@@ -22,7 +22,7 @@ interface CityListingItemProps {
|
||||
|
||||
export default function CityListingItem({ city }: CityListingItemProps) {
|
||||
const intl = useIntl()
|
||||
const galleryImages = mapImageVaultImagesToGalleryImages(city.images)
|
||||
const galleryImages = mapImageVaultImagesToGalleryImages(city.images || [])
|
||||
|
||||
return (
|
||||
<article className={styles.container}>
|
||||
@@ -40,7 +40,9 @@ export default function CityListingItem({ city }: CityListingItemProps) {
|
||||
<Subtitle asChild>
|
||||
<h3>{city.heading}</h3>
|
||||
</Subtitle>
|
||||
<ExperienceList experiences={city.experiences} />
|
||||
{city.experiences?.length && (
|
||||
<ExperienceList experiences={city.experiences} />
|
||||
)}
|
||||
<Body>{city.preamble}</Body>
|
||||
|
||||
<Divider variant="horizontal" color="primaryLightSubtle" />
|
||||
|
||||
@@ -20,7 +20,7 @@ interface CityListItemProps {
|
||||
|
||||
export default function CityListItem({ city }: CityListItemProps) {
|
||||
const intl = useIntl()
|
||||
const galleryImages = mapImageVaultImagesToGalleryImages(city.images)
|
||||
const galleryImages = mapImageVaultImagesToGalleryImages(city.images || [])
|
||||
|
||||
return (
|
||||
<article className={styles.cityListItem}>
|
||||
@@ -38,9 +38,11 @@ export default function CityListItem({ city }: CityListItemProps) {
|
||||
<Subtitle asChild>
|
||||
<h3>{city.heading}</h3>
|
||||
</Subtitle>
|
||||
<div className={styles.experienceList}>
|
||||
<ExperienceList experiences={city.experiences} />
|
||||
</div>
|
||||
{city.experiences?.length && (
|
||||
<div className={styles.experienceList}>
|
||||
<ExperienceList experiences={city.experiences} />
|
||||
</div>
|
||||
)}
|
||||
<div className={styles.ctaWrapper}>
|
||||
<Button intent="tertiary" theme="base" size="small" asChild>
|
||||
<Link href={city.url}>
|
||||
|
||||
@@ -23,7 +23,7 @@ export default function TopImages({ images, destinationName }: TopImageProps) {
|
||||
open: false,
|
||||
activeIndex: 0,
|
||||
})
|
||||
const lightboxImages = mapImageVaultImagesToGalleryImages(images)
|
||||
const lightboxImages = mapImageVaultImagesToGalleryImages(images || [])
|
||||
const maxWidth = 1366 // 1366px is the max width of the image container
|
||||
const visibleImages = images.slice(0, 3)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user