feat(SW-340): Added scroll to top button

This commit is contained in:
Pontus Dreij
2024-11-08 10:00:53 +01:00
parent 2748120890
commit 5f46844b9b
22 changed files with 238 additions and 99 deletions

View File

@@ -9,13 +9,14 @@ import HotelCard from "../HotelCard"
import styles from "./hotelCardListing.module.css"
import {
HotelCardListingProps,
HotelCardListingType,
type HotelCardListingProps,
HotelCardListingTypeEnum,
} from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps"
export default function HotelCardListing({
hotelData,
type = HotelCardListingType.PageListing,
type = HotelCardListingTypeEnum.PageListing,
state = "default",
}: HotelCardListingProps) {
const searchParams = useSearchParams()
@@ -36,7 +37,12 @@ export default function HotelCardListing({
<section className={styles.hotelCards}>
{hotels?.length ? (
hotels.map((hotel) => (
<HotelCard key={hotel.hotelData.name} hotel={hotel} type={type} />
<HotelCard
key={hotel.hotelData.name}
hotel={hotel}
type={type}
state={state}
/>
))
) : (
<Title>No hotels found</Title>