Files
web/apps/scandic-web/components/Blocks/CampaignHotelListing/index.tsx
Erik Tiekstra 0393f7b7b9 feat(SW-2270): Added hotel listing block to campaign overview page
Approved-by: Matilda Landström
2025-06-30 09:29:20 +00:00

36 lines
791 B
TypeScript

import { getHotelsByCSFilter } from "@/lib/trpc/memoizedRequests"
import CampaignHotelListingClient from "./Client"
interface CampaignHotelListingProps {
heading: string
preamble?: string | null
hotelIds: string[]
visibleCountMobile?: 3 | 6
visibleCountDesktop?: 3 | 6
}
export default async function CampaignHotelListing({
heading,
preamble,
hotelIds,
visibleCountMobile,
visibleCountDesktop,
}: CampaignHotelListingProps) {
const hotels = await getHotelsByCSFilter({ hotelsToInclude: hotelIds })
if (!hotels.length) {
return null
}
return (
<CampaignHotelListingClient
heading={heading}
preamble={preamble}
hotels={hotels}
visibleCountMobile={visibleCountMobile}
visibleCountDesktop={visibleCountDesktop}
/>
)
}