feat(SW-176): use temp data for hotel

This commit is contained in:
Fredrik Thorsson
2024-08-30 11:50:37 +02:00
parent ad0f42a90d
commit fa6108d718
2 changed files with 5 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
import { serverClient } from "@/lib/trpc/server"
import tempHotelData from "@/server/routers/hotels/tempHotelData.json"
import { mapFacilityToIcon } from "@/components/ContentType/HotelPage/data"
import {
@@ -29,14 +30,8 @@ export default async function HotelCard({
}: HotelCardProps) {
const intl = await getIntl()
const hotelResponse = await serverClient().hotel.get({
hotelId: hotelId.toString(),
language: getLang(),
})
if (!hotelResponse) return null
const { hotel } = hotelResponse
// TODO: Use real endpoint.
const hotel = tempHotelData.data.attributes
const sortedAmenities = hotel.detailedFacilities
.sort((a, b) => b.sortOrder - a.sortOrder)