diff --git a/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContent/index.tsx b/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContent/index.tsx index ea9fc8212..f91165ea7 100644 --- a/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContent/index.tsx +++ b/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContent/index.tsx @@ -22,6 +22,7 @@ import { getVisibleHotels } from "./utils" import styles from "./selectHotelMapContent.module.css" +import type { HotelData } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps" import type { SelectHotelMapProps } from "@/types/components/hotelReservation/selectHotel/map" export default function SelectHotelContent({ @@ -36,7 +37,7 @@ export default function SelectHotelContent({ const map = useMap() const isAboveMobile = useMediaQuery("(min-width: 768px)") - const [visibleHotels, setVisibleHotels] = useState([]) + const [visibleHotels, setVisibleHotels] = useState([]) const [showBackToTop, setShowBackToTop] = useState(false) const [isMapLoaded, setIsMapLoaded] = useState(false) const listingContainerRef = useRef(null) diff --git a/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContent/utils.ts b/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContent/utils.ts index 481ad21ba..8dcba2169 100644 --- a/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContent/utils.ts +++ b/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContent/utils.ts @@ -10,7 +10,7 @@ export function getVisibleHotelPins( const bounds = map.getBounds() if (!bounds) return [] - return filteredHotelPins.filter((pin: any) => { + return filteredHotelPins.filter((pin) => { const { lat, lng } = pin.coordinates return bounds.contains({ lat, lng }) }) @@ -22,8 +22,8 @@ export function getVisibleHotels( map: google.maps.Map | null ) { const visibleHotelPins = getVisibleHotelPins(map, filteredHotelPins) - const visibleHotels = hotels.filter((hotel: any) => - visibleHotelPins.some((pin: any) => pin.operaId === hotel.hotelData.operaId) + const visibleHotels = hotels.filter((hotel) => + visibleHotelPins.some((pin) => pin.operaId === hotel.hotelData.operaId) ) return visibleHotels }