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 (
{heading ? (

{heading}

) : null} {hotels.map((hotelData) => ( ))}
) }