Merge branch 'develop' into feat/SW-266-seo-loyalty-pages

This commit is contained in:
Pontus Dreij
2024-08-21 14:11:53 +02:00
87 changed files with 2056 additions and 10893 deletions

View File

@@ -1,4 +1,5 @@
import { serverClient } from "@/lib/trpc/server"
import tempHotelData from "@/server/routers/hotels/tempHotelData.json"
import HotelCard from "@/components/HotelReservation/HotelCard"
import HotelFilter from "@/components/HotelReservation/SelectHotel/HotelFilter"
@@ -18,14 +19,12 @@ export default async function SelectHotelPage({
const intl = await getIntl()
setLang(params.lang)
const { attributes } = await serverClient().hotel.getHotel({
hotelId: "d98c7ab1-ebaa-4102-b351-758daf1ddf55",
language: getLang(),
})
const hotels = [attributes]
// TODO: Use real endpoint.
const hotel = tempHotelData.data.attributes
const hotels = [hotel]
const hotelFilters = await serverClient().hotel.getFilters({
hotelId: "d98c7ab1-ebaa-4102-b351-758daf1ddf55",
hotelId: "879",
})
const tempSearchTerm = "Stockholm"
@@ -40,12 +39,7 @@ export default async function SelectHotelPage({
zoomLevel={11}
mapType="roadmap"
/>
<Link
className={styles.link}
color="burgundy"
variant="underscored"
href="#"
>
<Link className={styles.link} color="burgundy" href="#">
{intl.formatMessage({ id: "Show map" })}
<ChevronRightIcon color="burgundy" className={styles.icon} />
</Link>

View File

@@ -1,4 +1,5 @@
import { serverClient } from "@/lib/trpc/server"
import tempHotelData from "@/server/routers/hotels/tempHotelData.json"
import HotelCard from "@/components/HotelReservation/HotelCard"
import BedSelection from "@/components/HotelReservation/SelectRate/BedSelection"
@@ -14,11 +15,9 @@ import { LangParams, PageArgs } from "@/types/params"
export default async function SelectRate({ params }: PageArgs<LangParams>) {
setLang(params.lang)
// TODO: pass the correct hotel ID
const { attributes: hotel } = await serverClient().hotel.getHotel({
hotelId: "d98c7ab1-ebaa-4102-b351-758daf1ddf55",
language: getLang(),
})
// TODO: Use real endpoint.
const hotel = tempHotelData.data.attributes
const rooms = await serverClient().hotel.getRates({
// TODO: pass the correct hotel ID and all other parameters that should be included in the search
hotelId: "1",