diff --git a/apps/scandic-web/components/ContentType/HotelPage/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/index.tsx index b7f849203..32e465fe3 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/index.tsx @@ -41,6 +41,7 @@ import { Rooms } from "./Rooms" import SidePeeks from "./SidePeeks" import TabNavigation from "./TabNavigation" import { + getFilteredSlicedPois, getPageSectionsData, getTrackingHotelData, getTrackingPageData, @@ -230,7 +231,10 @@ export default async function HotelPage({ hotelId }: HotelPageProps) { hotelName={name} markerInfo={{ hotelType, hotelId }} /> - + diff --git a/apps/scandic-web/components/ContentType/HotelPage/utils.ts b/apps/scandic-web/components/ContentType/HotelPage/utils.ts index 9d3187aa2..1c1052d73 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/utils.ts +++ b/apps/scandic-web/components/ContentType/HotelPage/utils.ts @@ -1,7 +1,12 @@ import { logger } from "@scandic-hotels/common/logger" +import { PointOfInterestGroupEnum } from "@scandic-hotels/trpc/enums/pointOfInterest" import type { Lang } from "@scandic-hotels/common/constants/language" -import type { Hotel, HotelData } from "@scandic-hotels/trpc/types/hotel" +import type { + Hotel, + HotelData, + PointOfInterest, +} from "@scandic-hotels/trpc/types/hotel" import type { HotelPage } from "@scandic-hotels/trpc/types/hotelPage" import type { IntlShape } from "react-intl" @@ -186,3 +191,15 @@ export function getPageSectionsData( return sections } + +export function getFilteredSlicedPois(pois: PointOfInterest[]) { + return pois + .filter( + (poi) => + poi.categoryName === PointOfInterestGroupEnum.ATTRACTIONS || + poi.categoryName === PointOfInterestGroupEnum.LOCATION || + poi.categoryName === PointOfInterestGroupEnum.SHOPPING_DINING || + poi.categoryName === PointOfInterestGroupEnum.PUBLIC_TRANSPORT + ) + .slice(0, 3) +}