Merged in fix/SW-2841-filter-popup-closing-on-select (pull request #2289)

Fix/SW-2841 filter popup closing on select

* fix(SW-2841): refactored so that filter modal is not closed when selecting filters

* fix(SW-2841): rename component

* fix: review feedback

* fix: move font-family

* fix: change init value of filteredHotelIds

* fix

* fix: add Typography tag


Approved-by: Michael Zetterberg
Approved-by: Christian Andolf
This commit is contained in:
Tobias Johansson
2025-06-13 07:41:31 +00:00
parent 7be6c5dfb5
commit e645b15c6e
18 changed files with 339 additions and 175 deletions

View File

@@ -28,6 +28,7 @@ import { BookingCodeFilterEnum } from "@/types/enums/bookingCodeFilter"
export default function HotelCardListing({
hotelData,
unfilteredHotelCount,
type = HotelCardListingTypeEnum.PageListing,
}: HotelCardListingProps) {
const { data: session } = useSession()
@@ -104,8 +105,8 @@ export default function HotelCardListing({
}, [activeHotel, type])
useEffect(() => {
setResultCount(hotels.length)
}, [hotels, setResultCount])
setResultCount(hotels.length, unfilteredHotelCount)
}, [hotels, setResultCount, unfilteredHotelCount])
function isHotelActiveInMapView(hotelName: string): boolean {
return (