feat(SW-74): add hotel information

This commit is contained in:
Niclas Edenvin
2024-07-15 16:00:22 +02:00
parent 5cf616f6b0
commit 364979fdf4
4 changed files with 13 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
import { serverClient } from "@/lib/trpc/server"
import HotelCard from "@/components/HotelReservation/SelectHotel/HotelCard"
import HotelCard from "@/components/HotelReservation/HotelCard"
import styles from "./page.module.css"

View File

@@ -1,12 +1,20 @@
import { serverClient } from "@/lib/trpc/server"
import HotelCard from "@/components/HotelReservation/HotelCard"
import BreakfastSelection from "@/components/HotelReservation/SelectRate/BreakfastSelection"
import FlexibilitySelection from "@/components/HotelReservation/SelectRate/FlexibilitySelection"
import RoomSelection from "@/components/HotelReservation/SelectRate/RoomSelection"
import styles from "./page.module.css"
export default async function SelectRate() {
import { LangParams, PageArgs } from "@/types/params"
export default async function SelectRate({ params }: PageArgs<LangParams>) {
// TODO: pass the correct hotel ID
const { attributes: hotel } = await serverClient().hotel.getHotel({
hotelId: "d98c7ab1-ebaa-4102-b351-758daf1ddf55",
language: params.lang,
})
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",
@@ -15,7 +23,9 @@ export default async function SelectRate() {
return (
<div className={styles.page}>
<main className={styles.content}>
<div className={styles.hotelInfo}>Hotel info TBI</div>
<div className={styles.hotelInfo}>
<HotelCard hotel={hotel} />
</div>
<RoomSelection rooms={rooms} />
<FlexibilitySelection />
<BreakfastSelection />