Files
Matilda Landström 5171d2d4d7 Merged in fix/LOY-528-contenpage-gap (pull request #3479)
fix(LOY-528): fix gap issues on content pages

* fix(LOY-528): fix gap issues


Approved-by: Erik Tiekstra
2026-01-23 11:49:10 +00:00

45 lines
1021 B
TypeScript

import { Typography } from "@scandic-hotels/design-system/Typography"
import { getHotelsByCSFilter } from "@/lib/trpc/memoizedRequests"
import { Section } from "@/components/Section"
import HotelListingItem from "./HotelListingItem"
import styles from "./hotelListing.module.css"
import type { HotelListingProps } from "@/types/components/blocks/hotelListing"
export default async function HotelListing({
heading,
locationFilter,
hotelsToInclude,
contentType,
}: HotelListingProps) {
const hotels = await getHotelsByCSFilter({
locationFilter,
hotelsToInclude,
})
if (!hotels.length) {
return null
}
return (
<Section>
{heading ? (
<Typography variant="Title/sm">
<h3 className={styles.heading}>{heading}</h3>
</Typography>
) : null}
{hotels.map((hotelData) => (
<HotelListingItem
key={hotelData.hotel.name}
hotelData={hotelData}
contentType={contentType}
/>
))}
</Section>
)
}