Merged in fix/SW-946-map-center (pull request #954)

fix(946) Center from town name instead of calculate center

Approved-by: Niclas Edenvin
This commit is contained in:
Pontus Dreij
2024-11-22 07:19:13 +00:00
12 changed files with 63 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
import { notFound } from "next/navigation"
import { env } from "@/env/server"
import { getLocations } from "@/lib/trpc/memoizedRequests"
import { getCityCoordinates, getLocations } from "@/lib/trpc/memoizedRequests"
import { getHotelPins } from "@/components/HotelReservation/HotelCardDialogListing/utils"
import SelectHotelMap from "@/components/HotelReservation/SelectHotel/SelectHotelMap"
@@ -58,6 +58,7 @@ export default async function SelectHotelMapPage({
const hotelPins = getHotelPins(hotels)
const filterList = getFiltersFromHotels(hotels)
const cityCoordinates = await getCityCoordinates({ city: city.name })
return (
<MapModal>
@@ -67,6 +68,7 @@ export default async function SelectHotelMapPage({
mapId={googleMapId}
hotels={hotels}
filterList={filterList}
cityCoordinates={cityCoordinates}
/>
</MapModal>
)