From 364979fdf44b3f0314acf823871a85af65ec2536 Mon Sep 17 00:00:00 2001 From: Niclas Edenvin Date: Mon, 15 Jul 2024 16:00:22 +0200 Subject: [PATCH] feat(SW-74): add hotel information --- .../hotelreservation/select-hotel/page.tsx | 2 +- .../(public)/hotelreservation/select-rate/page.tsx | 14 ++++++++++++-- .../HotelCard/hotelCard.module.css | 0 .../{SelectHotel => }/HotelCard/index.tsx | 0 4 files changed, 13 insertions(+), 3 deletions(-) rename components/HotelReservation/{SelectHotel => }/HotelCard/hotelCard.module.css (100%) rename components/HotelReservation/{SelectHotel => }/HotelCard/index.tsx (100%) diff --git a/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx index 33df35812..c08cc2b18 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx @@ -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" diff --git a/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx index 16bc32937..e515f876b 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx @@ -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) { + // 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 (
-
Hotel info TBI
+
+ +
diff --git a/components/HotelReservation/SelectHotel/HotelCard/hotelCard.module.css b/components/HotelReservation/HotelCard/hotelCard.module.css similarity index 100% rename from components/HotelReservation/SelectHotel/HotelCard/hotelCard.module.css rename to components/HotelReservation/HotelCard/hotelCard.module.css diff --git a/components/HotelReservation/SelectHotel/HotelCard/index.tsx b/components/HotelReservation/HotelCard/index.tsx similarity index 100% rename from components/HotelReservation/SelectHotel/HotelCard/index.tsx rename to components/HotelReservation/HotelCard/index.tsx