diff --git a/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx index 92df6e355..b7d67e278 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/select-hotel/page.tsx @@ -16,9 +16,13 @@ export default async function SelectHotelPage({ }) const hotels = [attributes] + const hotelFitlers = await serverClient().hotel.getFilters({ + hotelId: "d98c7ab1-ebaa-4102-b351-758daf1ddf55", + }) + return (
- +
{hotels.map((hotel) => ( diff --git a/components/HotelReservation/HotelCard/hotelCard.module.css b/components/HotelReservation/HotelCard/hotelCard.module.css index b6b7ee3ae..25ed80018 100644 --- a/components/HotelReservation/HotelCard/hotelCard.module.css +++ b/components/HotelReservation/HotelCard/hotelCard.module.css @@ -1,6 +1,6 @@ .card { display: grid; - background-color: var(--Base-Surface-Primary-Normal); + background-color: var(--Base-Surface-Primary-light-Normal); border: 1px solid var(--Base-Border-Subtle); border-radius: var(--Corner-radius-Small); min-height: 460px; @@ -56,12 +56,14 @@ @media screen and (min-width: 850px) { .card { grid-template-columns: 1fr min(480px); - min-height: 270px; + height: 285px; + min-height: 285px; + width: 850px; max-width: 850px; } .image { - min-height: 270px; + min-height: 285px; } .booking { diff --git a/components/HotelReservation/SelectHotel/HotelFilter/index.tsx b/components/HotelReservation/SelectHotel/HotelFilter/index.tsx index 6141e5641..805939703 100644 --- a/components/HotelReservation/SelectHotel/HotelFilter/index.tsx +++ b/components/HotelReservation/SelectHotel/HotelFilter/index.tsx @@ -4,53 +4,39 @@ import { getIntl } from "@/i18n" import styles from "./hotelFilter.module.css" -export default async function HotelFilter() { +import { HotelFilterProps } from "@/types/components/hotelReservation/selectHotel/hotelFilterProps" + +export default async function HotelFilter({ filter }: HotelFilterProps) { const { formatMessage } = await getIntl() - const filters = await serverClient().hotel.getFilters({ - hotelId: "d98c7ab1-ebaa-4102-b351-758daf1ddf55", - }) - - const hotelFilters = filters.flatMap((filter) => filter.filter) - return ( ) diff --git a/server/routers/hotels/output.ts b/server/routers/hotels/output.ts index 87fac2830..521175f0c 100644 --- a/server/routers/hotels/output.ts +++ b/server/routers/hotels/output.ts @@ -491,4 +491,4 @@ const HotelFilter = z.object({ }) export const getFiltersSchema = z.array(HotelFilter) -export type Filter = z.infer +export type HotelFilter = z.infer diff --git a/server/routers/hotels/query.ts b/server/routers/hotels/query.ts index 3e2b7c9f7..6bdc325e0 100644 --- a/server/routers/hotels/query.ts +++ b/server/routers/hotels/query.ts @@ -106,7 +106,7 @@ export const hotelQueryRouter = router({ const validateFilterData = getFiltersSchema.safeParse(tempFilterData) if (!validateFilterData.success) { - console.info(`Get Individual Rates Data - Verified Data Error`) + console.info(`Get Individual Filter Data - Verified Data Error`) console.error(validateFilterData.error) throw badRequestError() } diff --git a/types/components/hotelReservation/selectHotel/hotelFilterProps.ts b/types/components/hotelReservation/selectHotel/hotelFilterProps.ts index a494982e5..b2b39d3e2 100644 --- a/types/components/hotelReservation/selectHotel/hotelFilterProps.ts +++ b/types/components/hotelReservation/selectHotel/hotelFilterProps.ts @@ -1,3 +1,3 @@ -import { Filter } from "@/server/routers/hotels/output" +import { HotelFilter } from "@/server/routers/hotels/output" -export type HotelFilterProps = { filter: Filter } +export type HotelFilterProps = { filter: HotelFilter[] }