diff --git a/apps/scandic-web/app/api/hoteldata/route.ts b/apps/scandic-web/app/api/hoteldata/route.ts index b55e13a59..cc07fbe74 100644 --- a/apps/scandic-web/app/api/hoteldata/route.ts +++ b/apps/scandic-web/app/api/hoteldata/route.ts @@ -25,8 +25,9 @@ export async function GET(request: NextRequest) { throw new Error("[WARMUP] Invalid language provided") } - const hotels = await serverClient().hotel.hotels.getAllHotels.get({ + const hotels = await serverClient().hotel.hotels.getDestinationsMapData({ lang: parsedLang.data, + warmup: true, }) return NextResponse.json(hotels) } catch (error) { diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/HotelList/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/HotelList/index.tsx index 313500ad2..e583a9f7c 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/HotelList/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/HotelList/index.tsx @@ -19,13 +19,15 @@ import { getVisibleHotels } from "./utils" import styles from "./hotelList.module.css" import { AlertTypeEnum } from "@/types/enums/alert" -import type { HotelDataWithUrl } from "@/types/hotel" +import type { DestinationPagesHotelData } from "@/types/hotel" export default function HotelList() { const intl = useIntl() const map = useMap() const coreLib = useMapsLibrary("core") - const [visibleHotels, setVisibleHotels] = useState([]) + const [visibleHotels, setVisibleHotels] = useState< + DestinationPagesHotelData[] + >([]) const { activeHotels, isLoading } = useDestinationDataStore((state) => ({ activeHotels: state.activeHotels, isLoading: state.isLoading, @@ -80,7 +82,7 @@ export default function HotelList() {