diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx index 5a23b06f7..0f636136f 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx @@ -71,6 +71,7 @@ export default async function SelectHotelMapPage({ hotelPins={hotelPins} mapId={googleMapId} isModal={true} + hotels={hotels} /> ) diff --git a/components/HotelReservation/HotelCard/hotelCard.module.css b/components/HotelReservation/HotelCard/hotelCard.module.css index 587feb29a..629b52be6 100644 --- a/components/HotelReservation/HotelCard/hotelCard.module.css +++ b/components/HotelReservation/HotelCard/hotelCard.module.css @@ -67,7 +67,7 @@ } @media screen and (min-width: 1367px) { - .card { + .card.listing { grid-template-areas: "image header" "image hotel" @@ -76,30 +76,30 @@ padding: 0; } - .imageContainer { + .listing .imageContainer { position: relative; min-height: 200px; width: 518px; } - .tripAdvisor { + .listing .tripAdvisor { position: absolute; display: block; left: 7px; top: 7px; } - .hotelInformation { + .listing .hotelInformation { padding-top: var(--Spacing-x2); padding-right: var(--Spacing-x2); } - .hotel { + .listing .hotel { gap: var(--Spacing-x2); padding-right: var(--Spacing-x2); } - .prices { + .listing .prices { flex-direction: row; align-items: center; justify-content: space-between; @@ -107,11 +107,11 @@ padding-bottom: var(--Spacing-x2); } - .detailsButton { + .listing .detailsButton { border-bottom: none; } - .button { + .listing .button { width: 160px; } } diff --git a/components/HotelReservation/HotelCard/index.tsx b/components/HotelReservation/HotelCard/index.tsx index 293530998..9ed97d961 100644 --- a/components/HotelReservation/HotelCard/index.tsx +++ b/components/HotelReservation/HotelCard/index.tsx @@ -4,23 +4,22 @@ import { useIntl } from "react-intl" import { mapFacilityToIcon } from "@/components/ContentType/HotelPage/data" import { PriceTagIcon, ScandicLogoIcon } from "@/components/Icons" import TripAdvisorIcon from "@/components/Icons/TripAdvisor" -import Image from "@/components/Image" import Button from "@/components/TempDesignSystem/Button" import Chip from "@/components/TempDesignSystem/Chip" import Link from "@/components/TempDesignSystem/Link" import Caption from "@/components/TempDesignSystem/Text/Caption" import Footnote from "@/components/TempDesignSystem/Text/Footnote" import Title from "@/components/TempDesignSystem/Text/Title" -import { getIntl } from "@/i18n" import ReadMore from "../ReadMore" import ImageGallery from "../SelectRate/ImageGallery" +import { hotelCardVariants } from "./variants" import styles from "./hotelCard.module.css" import type { HotelCardProps } from "@/types/components/hotelReservation/selectHotel/hotelCardProps" -export default function HotelCard({ hotel }: HotelCardProps) { +export default function HotelCard({ hotel, type = "listing" }: HotelCardProps) { const intl = useIntl() const { hotelData } = hotel @@ -28,8 +27,12 @@ export default function HotelCard({ hotel }: HotelCardProps) { const amenities = hotelData.detailedFacilities.slice(0, 5) + const classNames = hotelCardVariants({ + type, + }) + return ( -
+
{hotelData.gallery && ( { @@ -28,9 +31,9 @@ export default function HotelCardListing({ hotelData }: HotelCardListingProps) { return (
- {hotels.length ? ( + {hotels?.length ? ( hotels.map((hotel) => ( - + )) ) : ( No hotels found diff --git a/components/HotelReservation/SelectHotel/SelectHotelMap/HotelListing/hotelListing.module.css b/components/HotelReservation/SelectHotel/SelectHotelMap/HotelListing/hotelListing.module.css index 9ebb0678e..68f018601 100644 --- a/components/HotelReservation/SelectHotel/SelectHotelMap/HotelListing/hotelListing.module.css +++ b/components/HotelReservation/SelectHotel/SelectHotelMap/HotelListing/hotelListing.module.css @@ -5,5 +5,8 @@ @media (min-width: 768px) { .hotelListing { display: block; + width: 420px; + padding: var(--Spacing-x3) var(--Spacing-x4); + overflow-y: auto; } } diff --git a/components/HotelReservation/SelectHotel/SelectHotelMap/HotelListing/index.tsx b/components/HotelReservation/SelectHotel/SelectHotelMap/HotelListing/index.tsx index ecb639250..700ffaa71 100644 --- a/components/HotelReservation/SelectHotel/SelectHotelMap/HotelListing/index.tsx +++ b/components/HotelReservation/SelectHotel/SelectHotelMap/HotelListing/index.tsx @@ -1,13 +1,15 @@ "use client" +import HotelCardListing from "@/components/HotelReservation/HotelCardListing" + import styles from "./hotelListing.module.css" -import { HotelListingProps } from "@/types/components/hotelReservation/selectHotel/map" +import type { HotelListingProps } from "@/types/components/hotelReservation/selectHotel/map" -// TODO: This component is copied from -// components/ContentType/HotelPage/Map/DynamicMap/Sidebar. -// Look at that for inspiration on how to do the interaction with the map. - -export default function HotelListing({}: HotelListingProps) { - return
Hotel listing TBI
+export default function HotelListing({ hotels }: HotelListingProps) { + return ( +
+ +
+ ) } diff --git a/components/HotelReservation/SelectHotel/SelectHotelMap/index.tsx b/components/HotelReservation/SelectHotel/SelectHotelMap/index.tsx index 037967d55..eadd5f461 100644 --- a/components/HotelReservation/SelectHotel/SelectHotelMap/index.tsx +++ b/components/HotelReservation/SelectHotel/SelectHotelMap/index.tsx @@ -23,6 +23,7 @@ export default function SelectHotelMap({ hotelPins, mapId, isModal, + hotels, }: SelectHotelMapProps) { const searchParams = useSearchParams() const router = useRouter() @@ -66,7 +67,7 @@ export default function SelectHotelMap({ Filter and sort {/* TODO: Add filter and sort button */} - + void @@ -12,6 +15,7 @@ export interface SelectHotelMapProps { hotelPins: HotelPin[] mapId: string isModal: boolean + hotels: HotelData[] } export type HotelPin = {