feat(SW-251): use availability to get hotel

This commit is contained in:
Fredrik Thorsson
2024-09-09 10:02:35 +02:00
parent 024a095dc6
commit 8c530658c5
7 changed files with 64 additions and 120 deletions

View File

@@ -20,15 +20,6 @@ export default async function SelectHotelPage({
setLang(params.lang)
const tempSearchTerm = "Stockholm"
const getHotelFitlers = await serverClient().hotel.filters.get({
language: params.lang,
country: "Sweden",
city: "Helsingborg",
})
if (!getHotelFitlers) return null
const { filters } = getHotelFitlers
const getAvailableHotels = await serverClient().hotel.availability.get({
cityId: "8ec4bba3-1c38-4606-82d1-bbe3f6738e54",
@@ -56,7 +47,7 @@ export default async function SelectHotelPage({
{intl.formatMessage({ id: "Show map" })}
<ChevronRightIcon color="burgundy" />
</Link>
<HotelFilter filters={filters} />
<HotelFilter />
</section>
<section className={styles.hotelCards}>
{availability.length ? (